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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Change the fore colour of a command button

Status
Not open for further replies.

Syerston

Programmer
Jun 2, 2001
142
GB
Is there a way to change the fore colour (text) of a command button. John
 
Hi John,

Not that I'm aware of. What I always do is put a Frame(Enable = False,BorderStyle = 0) on the Button and put a Label on the Frame.

Jon
 
well i don't think it's possible..... but you could always make a little picture and use it INSTEAD of text.... this way you can have fancy text decoration aswell. But maybe the little shortcut thing (what & does... what's it called? the name escapes me.) well anyway maybe it wont work then.

Phr3-|-

for some of my muzic...
 
Thank you Swi,

That piece of code works perfectly John
 
Easier way than copying that chunk of code:
on the properties of a command button there is something called style - make this graphical and then choose the background colour - simple!
 
Easier way than copying that chunk of code:
on the properties of a command button there is something called style - make this graphical and then choose the background colour - simple!
 
Simple if you want to change the background colour, yes. Not so simple if you want to change the foreground colour, as per syerston's original query.
 
Another avenue may be to use a toggle button instead of a command button.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top