Restored from previous forum. Originally posted by Keith.
Hi,
Dose anyone know a way to change a buttons font and face colors?
I've looked on MSDN but there are no messages to change the colors using API.
Thanks
Keith
Button font color and face color
-
BackupUser
- PureBasic Guru

- Posts: 16777133
- Joined: Tue Apr 22, 2003 7:42 pm
Restored from previous forum. Originally posted by freak.
Hi,
For changing the Font, that's easy. First you need to load the Font you want to use:
#Font is just any Number, Name$ is the Font's name like "Arial" or "Courir",
YSize specifies the height of the Font in Pixel.
If FontID = 0, the Font wasn't found.
And then, before creating the Gadget (Button) you want, just write this:
That's it, the Button has another font...
About the Color:
Please readviewtopic.php?t=1572
That's it, hope it helps...
Timo
--
If it stinks, it's chemistry. If it moves, it's biology.
If it does not work, It's computer science.
Edited by - freak on 05 August 2002 23:52:10
Hi,
For changing the Font, that's easy. First you need to load the Font you want to use:
Code: Select all
FontID.l = LoadFont(#Font, Name$, YSize)
YSize specifies the height of the Font in Pixel.
If FontID = 0, the Font wasn't found.
And then, before creating the Gadget (Button) you want, just write this:
Code: Select all
SetGadgetFont(FontID.l)
About the Color:
Please readviewtopic.php?t=1572
That's it, hope it helps...
Timo
--
If it stinks, it's chemistry. If it moves, it's biology.
If it does not work, It's computer science.
Edited by - freak on 05 August 2002 23:52:10