A couple questions about the forms editor:
Is there any way to change the BackColor of Buttons and CheckBoxes?
Is there a way to set the default font used by the gadgets rather than manually changing each one?
BackColor
Re: BackColor
Nok3pto wrote:A couple questions about the forms editor:
Is there any way to change the BackColor of Buttons and CheckBoxes?
(in pure pb)
Yesk3pto wrote:Is there a way to set the default font used by the gadgets rather than manually changing each one?
In your main code, before call OpenWindow, use: SetGadgetFont(#PB_Default, ...
Something like that:
Code: Select all
Enumeration
#Font_Verdana_10
EndEnumeration
LoadFont(#Font_Verdana_10, "Verdana", 10)
SetGadgetFont(#PB_Default, FontID(#Font_Verdana_10))
XIncludeFile "<...>.pbf"
OpenWindow_0()
-
- Always Here
- Posts: 6425
- Joined: Fri Oct 23, 2009 2:33 am
- Location: Wales, UK
- Contact:
Re: BackColor
Windows Themes can get in the way, but there is a callback method to change the backcolour of CheckBox and Option gadgets (on Windows OS).Is there any way to change the BackColor of Buttons and CheckBoxes?
Changing the backcolour of buttons is possible but the result not very satisfactory - better instead to use an ImageButton or diy your own buttons using canvas gadgets.
netmaestro's code (brilliant by default)
http://www.purebasic.fr/english/viewtopic.php?t=24808
IdeasVacuum
If it sounds simple, you have not grasped the complexity.
If it sounds simple, you have not grasped the complexity.
Re: BackColor
Hi Marc56us and IdeasVacuum,
Thank you Marc56us for the font solution. It does exactly what I had hoped. Now, if there was a way to change the default font used by the editor...
IdeasVacuum: the solution by netmaestro is OK for someone who REALLY needs to change the color. My need is more of a curiosity to determine the features of PB.
Thank you both for the responses.
Thank you Marc56us for the font solution. It does exactly what I had hoped. Now, if there was a way to change the default font used by the editor...
IdeasVacuum: the solution by netmaestro is OK for someone who REALLY needs to change the color. My need is more of a curiosity to determine the features of PB.
Thank you both for the responses.
-
- Always Here
- Posts: 6425
- Joined: Fri Oct 23, 2009 2:33 am
- Location: Wales, UK
- Contact:
Re: BackColor
Default font used by the IDE:
File/Preferences/Editor/Editing/Select Font (My favourite is DejaVu Sans Mono)
RSBasic has written a library of 'how to' tips and tricks:
http://www.purebasic.fr/english/viewtop ... 27&t=62741
File/Preferences/Editor/Editing/Select Font (My favourite is DejaVu Sans Mono)
RSBasic has written a library of 'how to' tips and tricks:
http://www.purebasic.fr/english/viewtop ... 27&t=62741
IdeasVacuum
If it sounds simple, you have not grasped the complexity.
If it sounds simple, you have not grasped the complexity.
Re: BackColor
Thanks IdeasVacuum.. Nice font.IdeasVacuum wrote:...My favourite is DejaVu Sans Mono)
Only took a few minutes to find the site and install it!
http://dejavu-fonts.org/wiki/Download
- It was too lonely at the top.
System : PB 6.10 LTS (x64) and Win Pro 11 (x64)
Hardware: AMD Ryzen 9 5900X w/64 gigs Ram, AMD RX 6950 XT Graphics w/16gigs Mem
System : PB 6.10 LTS (x64) and Win Pro 11 (x64)
Hardware: AMD Ryzen 9 5900X w/64 gigs Ram, AMD RX 6950 XT Graphics w/16gigs Mem