| |||||||
I think it would be great and extra neato if input controls could have a chracter limit. You know, like restricting it to 140 characters for chat, or 16 characters for a username.
| |||||||
#1 May 25 2012, 5:39 am
|
||
This can be done with checks.
| ||
Kozuma3 wrote:
This can be done with checks. Yea, but not the same effect as preventing them from typing more than that many characters into the input control. | ||
#3 May 25 2012, 6:03 am
|
|
Ah, I understand now - Misunderstanding , this would be a nice feature (:
| |
#4 May 26 2012, 2:36 pm
|
|
One workaround would be to use a HUD input. The one in Forum_account's HUD Groups library is a good example. Just override a proc and perform the check.
It would be nice if the interface controls had "OnChange" events, but they would work better client-sided, which probably brings up a bunch of other unrelated issues. | |
Kaiochao wrote:
One workaround would be to use a HUD input. The one in Forum_account's HUD Groups library is a good example. Just override a proc and perform the check. That actually won't work. Round trip packets for every key press. It doesn't need to be fancy. All they need to do is allow us a little character limit variable just like it has a password-text-type variable. Its literally almost the same type of option. Client files would already contain the stored maximum amount of input per input control just like it already stores what kind of windows there are, what their names are, their sizes, etc. | |
#6 May 26 2012, 2:41 pm
|
|
I think Lummox JR would be like "NOPE. This'd need native ReGex" or something.
| |
Super Saiyan X wrote:
I think Lummox JR would be like "NOPE. This'd need native ReGex" or something. Actually this is no different than allowing us to change the font style of the input control. All they have to do is add this functionality. Windows controls already support this type of functionality. They just need to give us access to it. | |
#8 May 26 2012, 4:37 pm
|
|
You can put the textbox in a browser control and use JavaScript to limit how much is typed in the textbox, but that's probably overkill if you just need it for one input field.
| |
Forum_account wrote:
You can put the textbox in a browser control and use JavaScript to limit how much is typed in the textbox, but that's probably overkill if you just need it for one input field. That's not a bad idea. Is there any extra overhead with the browser control? Like if that text box was to be chat input? | |
FIREking wrote:
Forum_account wrote: I'm sure it takes more memory to allocate a browser control than to just create a textbox. The most annoying part would be managing keyboard focus. With the Interface library it's pretty easy - you can have a one line JavaScript function call a one line DM proc to set focus back to the map control, but most people wouldn't bother with that. Using a browser control makes more sense if you have a large form you want to validate client-side. | |
#11 May 26 2012, 5:29 pm
|
|
I think this is a very reasonable feature request that would take no time at all to add.
| |