Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Change Checkbox behaviour
Message
De
08/08/2006 09:48:04
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Versions des environnements
Visual FoxPro:
VFP 9
OS:
Windows XP SP2
Network:
Windows XP
Database:
Visual FoxPro
Divers
Thread ID:
01142907
Message ID:
01143772
Vues:
10
>My clients press ENTER to navigate through a form. Checkbox causes a problem here,
> as it's value changes on pressing ENTER key. I will need to use Y/N textbox instead.
> I have not subclasses the checkbox and it has already been implemented in the project.

Behold the wonders of subclassing!

>Is there a way to change the behaviour of Checkbox all over the project in one go?

You can do it at a form level:
1) Set each form's KeyPreview property to True.
2) add this code to each form's KeyPress event:

lparameters nKeyCode, nShiftAltCtrl
if nKeyCode = 13 and this.activecontrol.class = "Checkbox"
* Suppress enter's default behaviour..
nodefault
* .. but move to next control
keyboard '{tab}' plain
endif
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform