Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to Force user to push Enter in Edit Box in every l
Message
From
17/01/2001 14:05:23
 
 
To
16/01/2001 21:30:58
Stanley Yip
Shun Sang (technology) ltd Hong Kong
Hong Kong, Hong Kong
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00464509
Message ID:
00464816
Views:
14
>How to make the Edit box force the user to push Enter in order to go to the other line ? and how to disable the Edit box in order at the end of each line if the user not push Enter they can't go to the new line ?
>I have try to add a code in the interactive change method in the Edit box to check when rearch the end of the line auto add a enter but I find that when the user typing is very fast then the respon of the the computer the window will crach ! why ?

I don't know what's the purpose to force the user to do this, but if what you need is to have the entered text to break at a certain character for format reasons (maybe it have to be sent as a txt or something like that), what you can do is prostprocess the value in the editbox valid (for example).

You can do this using something like:
* EditBox.Valid()

lcResult = ""

for i = 1 to memLines( this.value )
  
  lcResult = lcResult + mLine( this.value, i ) + chr(13)
next

this.value = lcResult
This code isn't tested, and you have to take in consideration SET MEMOWIDTH to control how long each line is returned by MLINE(), but may be you can use this as a starting point.

Hope this helps.
Previous
Reply
Map
View

Click here to load this message in the networking platform