In the When event of the textbox put your evaluation/condition expression...
Return (your expression resulting in .T. or .F.)
if your expression evaluates to .T. then the control will receive focus, if on the other hand your expression evaluates to .F. then the control will not receive focus.
>Hi all
>
>I have in a textboxclass.getfocus() a condition (in a property cselfskip) to check for and if true it is supposed to skip out of itself by KEYBOARD "{Tab}"
>
>If I do this.enabled = .F. instead of KEYBORAD "{Tab}" I guess the next time this control will never get focus.
>
>Any elegant way to do this better?
>
>I would like to keep it at the txt level (cselfskip) and not make the form responsible for it, unless there is some way I can specify the condition in the txt (cselfskip) and yet the form is made responsible to do the skipping of the control.