Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to add image to the Toolbar ?
Message
 
To
17/03/1999 07:29:16
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00184681
Message ID:
00198502
Views:
32
Hi chang,

It sounds like there maybe some logic problems here. Let's assume 4 images, that we'll call: flat.bmp (for when the mouse isn't over the image), raised.bmp (for when the mouse is over the image), pressed.bmp (for the depressed state), and disabled.bmp (for when the button's disabled). Naturally, if the "button" is disabled, the image's .Enabled property should be set to false. Since the events associated with mouse movement don't fire when the control's disabled, we don't have to worry about other conditions or the image changing.

In the form's MouseOver event, the image should be checked to see if it's disabled. If it isn't and the flat.bmp isn't displayed, then the images Picture should be set to flat.bmp.

In the image's MouseOver event, if the image is flat.bmp, then it should be set to raised.bmp.

In the image's MouseDown event, if the image isn't pressed.bmp, then it should be set to that image.

In the image's MouseUp event, the image should be restored to raised.bmp.

The image won't be restored to flat.bmp unless the form's MouseOver event fires.

That should do it.
George

Ubi caritas et amor, deus ibi est
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform