Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Editbox and uppercase
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00332098
Message ID:
00332107
Views:
14
>I do not remember how to get the uppercase while typing in the editbox. The operator "!" does not work.
>Any suggest?
>Thanx in advance

My mistake, in the keypress event you can enter the following code:

LPARAMETERS nKeyCode, nShiftAltCtrl

* Because there is a bug with a format of ! in an edit box
* we will check if the user wishes upper case
* and run the following fix
IF '!' $ THIS.FORMAT
IF nKeyCode >= 97 AND nKeyCode <= 122
NODEFAULT
KEYBOARD UPPER(CHR(nKeyCode))
ENDIF
ENDIF

I set the format to be ! for the edit box, then this code in my base class will check for it. If it finds that I want a ! format it will put it to uppercase in the keypress event. Because sometimes I dont want uppercase.
Bret Hobbs

"We'd have been called juvenile delinquents only our neighborhood couldn't afford a sociologist." Bob Hope
Previous
Reply
Map
View

Click here to load this message in the networking platform