Colour of command buttons

dan54

Registered User.
Local time
Today, 10:10
Joined
Feb 11, 2002
Messages
13
Does anyone know how to change the background colour of a command button (the default of which is a blue colour) without making the 'Picture' property a filled in block of colour imported from a paint program. Any help will be much appreciated. Cheers.
 
It is not possible to change the background color of command buttons. A few options exist:
You can 'imitate' command buttons by using labels with the Raised property set to Yes and putting your code behind the click feature. Keep in mind the cursor will not change unless you take some additional steps.
You can make your command button transparent and put a picture behind it, as I believe you mentioned. For a small button this does not add much overhead.

HTH,
David R
 
Cheers for the help
 
Although you can not change the colour of your command buttons you can display a picture on them and if you creat a square bitmap image and use that as your picture you will have a button that appears to be what ever colour you want.
 
I have never tried this before but wouldn't this take up a lot of memory in your db? I tried copying some logos into my db and the memory size shot up so much that I decided to only have the one logo on my switchboard.
 
try creating a picture and have this as a button, get rid of the original button and put your code behind the new picture. I have over 100 pictures, 50 of which are logos and the rest are substitutes for buttons, this has only made my total database 5mb's, which has over 18 forms (and yes they are needed before anyone asks). Or as David said make the button invisable and put your picture behind it.

smile.gif
 
Just thought I would add on another little "trick" regarding using labels as command buttons.

You would realize that at some point during data entry, the user is ready to use a command button/label. Ideally, you would want the tab to take focus to the command button/label; not requiring the user to grab the mouse and move away from the keyboard.

Since you cannot set focus to a label, I created command buttons, which run the procedure, and put them directly on top of my labels. I set the command buttons to transparent. Therefore they do not show and ARE included in the Tab Order. I've even gone so far as to add Got Focus and Lost Focus events to these transparent command buttons that toggle the FontBold or BackGround color of their repective VISIBLE labels.

All a bunch of work, but it looks good. It's a matter of preference and how much play you want to put into your form appearance. But the use of command buttons allowing the user to remain on the keyboard is certainly a valuable benefit where the data entry operator is concerned.

Have a good day all!
 

Users who are viewing this thread

Back
Top Bottom