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

Command button color

Status
Not open for further replies.

carmined58

Technical User
Jun 13, 2000
7
0
0
US
Can anyone please tell me how to change the color of a command button, other than using a bmp, jpg, or using a label to cover it? Thank you.
 
You can change the ForeColor (the text) but you cannot change the background color, short of changing Windows colors.&nbsp;&nbsp;Its &quot;by design&quot; so that the basics of the UI respect the user's Windows settings; it would be nice to have the option, though. <p>Robert Bradley<br><a href=mailto: > </a><br><a href= - Visual FoxPro Development</a><br>
 
If you don't mind to use the label inside a container, this could be one way to get what you want:<br>-1- create a container (this is your &quot;command button's&quot; background with all properties & methods you need -but the most important might be the code in its CLICK event because you will simulate the label's click event with this event)<br>-2- add a label inside the container with its BACKSTYLE='Transparent' and in its CLICK event, add:<br>THIS.PARENT.CLICK()
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top