Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
[ENTER] to cause EditBox to lose focus
Message
De
12/04/2011 12:13:55
 
 
À
12/04/2011 01:55:19
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Versions des environnements
Visual FoxPro:
VFP 9 SP1
OS:
Windows XP SP1
Divers
Thread ID:
01506929
Message ID:
01507028
Vues:
127
>>>>Yes, thank you... but a CHR(13) is included in the EditBox.Value...I'm trying to work out the code to strip out this.
>>>
>>>In control's keypress event:
>>>
>>>
>>>LPARAMETERS nKeyCode, nShiftAltCtrl
>>>
>>>IF nKeyCode=13 AND nShiftAltCtrl=0
>>>	NODEFAULT
>>>	KEYBOARD '{TAB}' PLAIN
>>>ENDIF
>>>
>>
>>Brandon, thanks a lot. I was going this direction:
>>
this.value = SUBSTR(this.Value,1,AT(CHR(13),this.Value))
>>
>>But NODEFAULT is quite elegant!
>>
>>dg
>
>As side note ;
>By altering functionality of ENTER you might confuse users who are used to creating new lines (or breaking existing) in a editing
>text. You might consider doing handling as Brandon suggested, but with combination of keys (eg. CTRL+ENTER) insted
>of ENTER itself.
>(+ support by Tooltip, or other kind of direct on-form help/instruction )
>
>HTH
>Sergio
Sergio:
Excellent point, thank you. What I'm really trying to accomplish would be a text box with limited width on a form and to simulate word-wrap... soooo, I'm using an edit box without scroll bars. The text will "wrap" as entered and moves to the next object upon ENTER. Hopefully it won't be too confusing, but you are correct it is non-conventional.
dg
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform