Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

uppercase textbox using interactivechange or form's keypreview fails

Status
Not open for further replies.

andremara

Programmer
Feb 5, 2003
1
US
Hi,
I have a textbox on a form I would like uppercased as its being typed. I tried 2 solutions, the first one being obvious - put This.Value=upper(This.Value) inside the interactiveChange event of the textbox. This didn't work because it results in the cursor being positioned at the beginning of the textbox.
So now I'm using a form's Keypress property to uppercase keystrokes thinking that foxpro will then pass the keystroke event on to the object in the form that generated the keypress, but that doesn't seem to be happening.
Any suggestions?
Thanks!
Andre
 
I'm thinking he MUST be talking about an EditBox, because there is no built in formatting for them?

Otherwise, Mike has hit the nail on the head.

Regards

Griff
Keep [Smile]ing

There are 10 kinds of people in the world, those who understand binary and those who don't.
 
Even if it is indeed an Edit Box control - it does have the Format property. At least, this is what VFP9's Help says... :)

Regards,

Ilya
 
Ilya,

In fact, an edit box does have a Format property, as you say. But the only formatting character it recognises is K ("select on entry").

But before we go too far with this discussion, perhaps Andre could confirm whether he is using a text box or an edit box in this case.

Mike

__________________________________
Mike Lewis (Edinburgh, Scotland)

Visual FoxPro articles, tips, training, consultancy
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top