Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Edtbox handling on Enter for more lines
Message
De
18/07/2000 23:39:55
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Titre:
Edtbox handling on Enter for more lines
Divers
Thread ID:
00394179
Message ID:
00394179
Vues:
53
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.
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform