James, thanks a lot for taking all this time to provide a brilliantly
detailed solution.
I took this long to reply coz it's a holiday here in the UK today.
Yes, if that is OK with you, I would like a sample of the code. My
work e-mail address is Michel@Le-Software-Man.com
Michel Creppy.
================ Your original message follows ====================
Michel:
VFP pretty much follows the microsoft windows standard for command buttons, which means that
very pleasant raincloud gray (sarcasm!) is the color you get unless you want to dink about with the
API.
What I have done is design a "button" consisting of a container, an image and a label.
Design a container to the size button you want in raised style. Put an image on it in the position you
want, and a label. You will have to transfer the mousedown, mouseup and click events of the image
and label to the underlying container. In the mousedown event of the container, your code should
change the container to a a recessed form, and set the label disabled. The Mouseup event should
return the button's features to their normal state. To the user the button appears to have been
depressed and released when mouseclicked. The click event then contains the code for what you
want the button to do.
If you define a .statusbartext and .tooltip propery for the pseudo button, you can make tooltips and
the statusbar message display just like a regular command button.
Save the whole thing as a class in your base class library, and use it whenever you would normally
use a command button.
The advantages of the pseudo button are:
1. You can make in any color you want.
2. You can have the picture display at the top, left, right or bottom of the button text -- unlike the
commandbutton which displays at the top only.
3. You can design it is a long, narrow button with the picture on the same line as the text -- which
fits better in may of my forms. I standardize my button at 24 pxls high and 100 pxls wide, which is
the same height as most of my textbox objects, making it convenient to place a textbox and
pseudobutton on the same horizontal plane of the form.
I'm not at the office now, but I can send you my code on Monday, if you wish.
Regards,
JME
jmEdgar
JurixDataCorporation
jurix@navix.net