Jump to content

Recommended Posts

Posted

Is it possible to check if a string is too long for an Inputcontrol?

"It's easier to disintegrate an atom than a prejudice." (A.Einstein)---------------------------------------------------------------------------My C++ - tools:Tidy tool-->indents your c++ sourceCleanscript --> cleans autoit-code before compiling (co-author: peethebee)My tools:GUIBuilder-->build your window and get the source; german versionMy Games:OnlineGameCenter-->Online Chess and Connect4 with a rtf-chatSnake-->including a level editor to build your own levelsTetris-->the well known game, big funOther things:Tower of Hanoi-->perfect riddler with graphic output

Posted

Set the limit to whatever you wish. You could also do it a few other ways but if you only want a certain number of characters entered it's easiest to set a limit.

Posted

Set the limit to whatever you wish. You could also do it a few other ways but if you only want a certain number of characters entered it's easiest to set a limit.

problem:

an "i" isn't as wide as an "a" for example, so the string pixel-width is dependant of the letters used

"It's easier to disintegrate an atom than a prejudice." (A.Einstein)---------------------------------------------------------------------------My C++ - tools:Tidy tool-->indents your c++ sourceCleanscript --> cleans autoit-code before compiling (co-author: peethebee)My tools:GUIBuilder-->build your window and get the source; german versionMy Games:OnlineGameCenter-->Online Chess and Connect4 with a rtf-chatSnake-->including a level editor to build your own levelsTetris-->the well known game, big funOther things:Tower of Hanoi-->perfect riddler with graphic output

Posted

If you use a mono-spaced font all characters are the same width. It's easy to do it that way and if a string is too long an input wouldn't be as effective as an edit control. If you're worried about that use the edit and you should have the scrollbar for horizontal scrolling.

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
  • Recently Browsing   0 members

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