>Hi everybody,
>
>I put this code in my textbox class InteractiveChange and ProgrammaticChange
>
>IF this.lNoSpacesAllowed AND VARTYPE(this.Value) = 'C'
> this.Value = STRTRAN(this.Value, SPACE(1),"")
>ENDIF
>
>The textbox in question has also some valid code.
>
>Now, every time I type something the focus stays at the very first character of the textbox (making the effect or Right to Left).
>
>Do you know what is wrong in my implementation and what would be the best way to fix it?
>
>Thanks in advance.
Try this
IF this.lNoSpacesAllowed AND VARTYPE(this.Value) = 'C'
lnvar = This.SelStart
this.Value = STRTRAN(this.Value, SPACE(1),"")
This.SelStart = IIF(LEN(This.Value) > m.lnVar, m.lnVar, LEN(This.Value))
ENDIF
_______________________________________________________________
Testing displays the presence, not the absence of bugs.
If a software application has to be designed, it has to be designed correctly!
_______________________________________________________________
Vladimir Zografski
Systems Analyst