Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Color of Text on a button 1

Status
Not open for further replies.

vsprogrammer

Programmer
Jun 26, 2006
40
CA
Hello,

I have a button and depending if there are any alerts against a case I need to change the text to red and if there are no alerts against a case the text needs to stay at black. I don't see the property of forecolor as an option, can anybody help?

Thanks,
 
One way...

Set the style to graphical and then load an image depending on the alert status. The image could simply be words written in black or red depending on the condition. To do this, you'll want to use the LoadPicture function.

button.picture = LoadPicture("C:\Images\AlertImage.bmp")



-George

Strong and bitter words indicate a weak cause. - Fortune cookie wisdom
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top