Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How do I preserve text in an Edit Box?
Message
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
01307903
Message ID:
01307908
Views:
10
This message has been marked as the solution to the initial question of the thread.
>An Edit Box on my form is programatically auto-populated with some text prior to getting focus.
>
>I need to be able to allow the user to append text in the edit box, but not delete or modify the initial text. I cannot figure out how to accomplish this. Any code I place in the Keypress event method or the InteractiveChange event method seems to be ignored.
>
>Anyone????

Not tested:
*** Init event of the form (or After binding the fields):
thisform.EditBox.Tag = TRANSFORM(LEN(thisform.EditBox.Value))


*** KeyPress Event of the EditBox
LPARAMETERS nKeyCode, nShift
IF this.SelStart <= VAL(this.Tag)
   NODEFAULT
   RETURN
ENDIF
Again. that is not tested at all.
Against Stupidity the Gods themselves Contend in Vain - Johann Christoph Friedrich von Schiller
The only thing normal about database guys is their tables.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform