Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Removing spaces from a textbox
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Classes - VCX
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Vista
Network:
Windows 2003 Server
Database:
MS SQL Server
Divers
Thread ID:
01448981
Message ID:
01448984
Vues:
81
This message has been marked as a message which has helped to the initial question of the thread.
>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
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform