×
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Contact US

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Buttons, Do they allways have to be gray?

Buttons, Do they allways have to be gray?

Buttons, Do they allways have to be gray?

(OP)
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.

RE: Buttons, Do they allways have to be gray?

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.

Kathryn


RE: Buttons, Do they allways have to be gray?

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.

MichaelRed
mred@duvallgroup.com
There is never time to do it right but there is always time to do it over

RE: Buttons, Do they allways have to be gray?

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.

Kathryn


RE: Buttons, Do they allways have to be gray?

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 "button" 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 "see it in action", try one out with Part of the caption as "... Click Here to ..."?

MichaelRed
mred@duvallgroup.com
There is never time to do it right but there is always time to do it over

RE: Buttons, Do they allways have to be gray?

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!!!

MichaelRed
mred@duvallgroup.com
There is never time to do it right but there is always time to do it over

RE: Buttons, Do they allways have to be gray?

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 ..." argument, I don't really seel it (the reason).

MichaelRed
mred@duvallgroup.com
There is never time to do it right but there is always time to do it over

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close