Page 1 of 1

Posted: Mon Aug 05, 2002 8:11 pm
by BackupUser
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

Posted: Mon Aug 05, 2002 10:50 pm
by BackupUser
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:

Code: Select all

FontID.l = LoadFont(#Font, Name$, YSize) 
#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:

Code: Select all

SetGadgetFont(FontID.l)
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