Jump to content

Why does $ES_UPPERCASE limit the size of my input box?


simbo
 Share

Recommended Posts

Hi All

I have several input boxes in my program that look something like this:-

guictrlcreateinput(10,10,100,20,$ES_UPPERCASE)

This does indeed automatically convert the user's entry into capital letters, but it also limits the amount they can type in. It seems to be limited by the width of the box.

This happens regardless of whether I'm using GUICtrlSetLimit or not.

Has anybody got any ideas? I can use Guictrlread, convert it with Stringupper and then Guictrlsetdata it back in again, but that seems a bit messy. Have I missed something obvious?

Thanks in advance

Matt

Link to comment
Share on other sites

You missed the fact that by using $ES_UPPERCASE you lost $ES_AUTOHSCROLL

Use BitOR($ES_UPPERCASE, $ES_AUTOHSCROLL)

Edit: You don't really need $ES_UPPERCASE unless you want it to display in uppercase for a reason.

You can just use $whatever = StringUpper(GuiCtrlRead($input))

Edited by GEOSoft

George

Question about decompiling code? Read the decompiling FAQ and don't bother posting the question in the forums.

Be sure to read and follow the forum rules. -AKA the AutoIt Reading and Comprehension Skills test.***

The PCRE (Regular Expression) ToolKit for AutoIT - (Updated Oct 20, 2011 ver:3.0.1.13) - Please update your current version before filing any bug reports. The installer now includes both 32 and 64 bit versions. No change in version number.

Visit my Blog .. currently not active but it will soon be resplendent with news and views. Also please remove any links you may have to my website. it is soon to be closed and replaced with something else.

"Old age and treachery will always overcome youth and skill!"

Link to comment
Share on other sites

Thanks very much. It's obvious now you say it, but I've been head scratching for a while now!

I did try $whatever = StringUpper(GuiCtrlRead($input)) but my novice users moaned about "strange things happening in the background"!

Thanks again

You missed the fact that by using $ES_UPPERCASE you lost $ES_AUTOHSCROLL

Use BitOR($ES_UPPERCASE, $ES_AUTOHSCROLL)

Edit: You don't really need $ES_UPPERCASE unless you want it to display in uppercase for a reason.

You can just use $whatever = StringUpper(GuiCtrlRead($input))

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...