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.
* Human is a question asked by birth and answered by death. Machine is another kind of question with another kind of answer