General information
Category:
Coding, syntax & commands
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
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only