Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Changing back color of a command button
Message
From
27/03/2001 18:42:40
 
 
To
27/03/2001 15:43:41
Gerry Schmitz
GHS Automation Inc.
Calgary, Alberta, Canada
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00489076
Message ID:
00489232
Views:
18
Hi Gerry,
your approach of simulating a command button by using a container works well, however I did come across one problem. When I tried it on one of my forms the button would react to mouse down/mouse up events but the (specialeffect) appearance wasn't changing on the form so the button did not appear depressed when the mouse was down.
When I stepped through the code with the debugger it was possible to see that the specialeffect value was changing but nothing seemed to refresh the button appearance on the form (including the obvious refresh() method).
Just as I was about to give up a colleague testing it with me put a this.backcolor=rgb() statement in the mousedown and the mouseup to see if at least the colors would change and lo and behold not only the colors changed but the specialeffect setting was activated!

Further testing shows that the RGB() statements have to be in both MouseUp and MouseDown (any color is OK).

Another weird VFP thing.......
Sam Robbins BCRTC
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform