Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Edtbox handling on Enter for more lines
Message
From
18/07/2000 23:39:55
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Title:
Edtbox handling on Enter for more lines
Miscellaneous
Thread ID:
00394179
Message ID:
00394179
Views:
54
what should I do on giving user to press enter to get more lines in Edtbox?
I have tried keypress event on nKeyCode is 13
If nKeyCode = 13
  nodefault()
  nSelStart = This.selstart
  This.value = Left(this.value, nSelStart-1) + chr(13) +;
     iif(nSelstart < len(this.value), substr(this.value, nSelstart+1), [])

endif
It seem work fine if the line got many characters, but when I tried to type:

A [enter] B [enter] C [enter]

The out come is:
[blank line]
[blank line]
[blank line]
CBA

Why? when did the edtbox get a Chr(10) character, I never assign or give it at all!!
The weak wait for chance, The strong bid for chance,
The clever notch up chance, but The merciful give you chance.
Next
Reply
Map
View

Click here to load this message in the networking platform