Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Changing back color of a command button
Message
De
27/03/2001 18:42:40
 
 
À
27/03/2001 15:43:41
Gerry Schmitz
GHS Automation Inc.
Calgary, Alberta, Canada
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Divers
Thread ID:
00489076
Message ID:
00489232
Vues:
19
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
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform