Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Ticking Checkbox by mouse or spacebar only.
Message
From
14/09/1997 21:58:25
 
 
To
12/09/1997 10:07:09
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00049767
Message ID:
00050069
Views:
37
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.
Previous
Reply
Map
View

Click here to load this message in the networking platform