Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Ticking Checkbox by mouse or spacebar only.
Message
De
14/09/1997 21:58:25
 
 
À
12/09/1997 10:07:09
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00049767
Message ID:
00050069
Vues:
42
Thanks Vladimir and Mark for your assistance....

>Hi Farouk!
>
>Add the property lIgnoreEnter with .f. as default and lOldValue
>to your checkbox class:
>
>PROCEDURE GotFocus
> this.lOldValue=this.Value
>ENDPROC
>PROCEDURE Init
>if not empty(this.ControlSource)
> this.lOldValue=eval(this.ControlSource)
>else
> this.lOldValue = this.Value
>endif
>ENDPROC
>PROCEDURE Click
>LOCAL lnKeycode
>lnKeycode=lastkey()
>do case
> CASE lnKeyCode=13
> nodefault
> if this.lIgnoreEnter
> this.Value=this.lOldValue
> else
> =dodefault()
> endif
> otherwise
> =dodefault()
>endcase
>this.lOldValue=this.Value
>ENDPROC
>
>HTH
>
>>Does anyone knows how to prevent checkboxes from being checked when
>RETURN
>>key is press? If possible , checking can only be done on mouse click or
>>spacebar... Thanks.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform