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

Buttons, Do they allways have to be gray?

Status
Not open for further replies.

mhall

Technical User
Sep 26, 2000
13
GB
Changing the colour of the text on a button is easy, but I would realy like to change the colour of the button. Is it possible?, if so how. [sig][/sig]
 
It is possible, even if I'm not sure what you mean. You can change the default button of any new buttons, by clicking on the command button in the toolbar and then choosing View Properties. You will get the Default Command Button property box. I think any changes only hold for the current DB.

If you want to change all the existing buttons on all of your existing forms, you need to do something like this psuedocode

For each Form in my Database
For each Control in Form.Controls
if Control.Type is CommandButton
Control.PropertyName is YourNewColor
Endif
Next
Next

Hope that helps.
[sig]<p>Kathryn<br><a href=mailto: > </a><br><a href= > </a><br> [/sig]
 
Kathryn,

What version of Ms. are you refering to? Up through '97, there is no property for the color of command buttons, in anything I've seen. It could be a nice feature, but I have never found it.

[sig]<p>MichaelRed<br><a href=mailto:mred@duvallgroup.com>mred@duvallgroup.com</a><br>There is never time to do it right but there is always time to do it over[/sig]
 
You are totally correct. Mea culpa. I answered WAY too early this morning.

Could you use raised textboxes? You can make them locked but enabled and code into their click events.

Sorry for the misinformation. [sig]<p>Kathryn<br><a href=mailto: > </a><br><a href= > </a><br> [/sig]
 
Actually, I have seen something likr this done with LABEL controls, which have all ot the properties necessary.

A little disconcerting for some novice users, and not exactly the shape (rounded corner rectangle) of a standard &quot;button&quot; but functionally it will work JUST FINE.

If you got custom controls, You might find either a command button with the capability of changing the background color, or a way to mask the Label so it would have rounded corners.

Just to &quot;see it in action&quot;, try one out with Part of the caption as &quot;... Click Here to ...&quot;?

[sig]<p>MichaelRed<br><a href=mailto:mred@duvallgroup.com>mred@duvallgroup.com</a><br>There is never time to do it right but there is always time to do it over[/sig]
 
Then, sometimes the simplest is the best. Once 'you' start to muck with the background color, 'you' will need to figure out how to be sure the foreground color is 'contrasting' (if not, no one can read the caption to know what to do!)

Try this by setting the foreround coleor of a (normal?) command button to the grey that the background already is. Then try varying is slightly. Users WILL NOT appreciate the use of 'stealth technology' on the forms they need to use to get work done!!!

[sig]<p>MichaelRed<br><a href=mailto:mred@duvallgroup.com>mred@duvallgroup.com</a><br>There is never time to do it right but there is always time to do it over[/sig]
 
I know, I know, I know! I'm getting tiresome. One more (last?) thought? Are we attempting to do this 'just beacuse' (it was asked?) or - is there some functional advantage to upsetting this particular apple cart (I am not a big fan of stacking semi-rounded objects). If this is all about the cosmetics, then - my opinion - is that 'it' will be more work than the benefit (cost/benefit ratio). There may be a reason to persue this, but aside from the ' ... because it's there ...&quot; argument, I don't really seel it (the reason).

[sig]<p>MichaelRed<br><a href=mailto:mred@duvallgroup.com>mred@duvallgroup.com</a><br>There is never time to do it right but there is always time to do it over[/sig]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top