Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Formatting EditBox
Message
De
15/03/2003 10:05:10
 
 
À
15/03/2003 08:06:00
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00766165
Message ID:
00766176
Vues:
25
Hi

A better solution for the keypress:

do case
case chr(nkeycode) <> upper(chr(nkeycode))
NODEFAULT
nKeyCode=asc(upper(chr(nkeycode)))
DODEFAULT()
endcase




>>Hi everybody.
>>1. How can I make the text in the edit box ‘Justify’ (like MS Word)?
>>2. How can force the input in the edit box as upper case (like format ‘!’ for the text box)?
>>
>>Thanks and Regards,
>>Yashodhan.
>
>
>Yashodhan,
>
>(1) don;t think that is possible
>
>(2) since the ! format does not work, you could trap the char in the keypress event of the edit box. Code below seems to work
>
>** EditBox.KeyPress
>LPARAMETERS nkeycode,nshiftaltctrl
>
>do case
>case between(nkeycode, 0, 255)  and inlist(nShiftAltCtrl, 0, 1)
>	do case
>	case chr(nkeycode) <> upper(chr(nkeycode))
>		NODEFAULT
>		keyboard upper(chr(nkeycode)) PLAIN
>	endcase
>endcase
>
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform