GuiTextEditCtrl + All Selected = Eats the first keypress?
by Tim Scheiman · in Technical Issues · 02/09/2010 (8:35 pm) · 1 replies
Hey all.
I've got a GuiTextEditCtrl called profileText that I'm using for name entry, and when it first pops up I use:
profileText.selectAllText();
to nicely highlight the default text, which is "Type your Name Here."
The problem is, when all highlighted like this, the first keystroke -- say "T" in Tim, doesn't show up -- it just clears all of the highlighted text and leaves it blank. The next keystrokes all show up as designed.
If I don't use select all the first keystroke works fine.
So I guess the question is -- can anyone think of a way to fix this? I wouldn't figure the act of selection should cause this behavior. As of right now I'm just getting by without using the selection... but it looked SO NICE before. :)
Barring a fix (source or script!), can anyone think of a clever way to work around it using the Command callback? It is called during the first keystroke, but the keystroke letter isn't captured.
Thanks,
-Tim
I've got a GuiTextEditCtrl called profileText that I'm using for name entry, and when it first pops up I use:
profileText.selectAllText();
to nicely highlight the default text, which is "Type your Name Here."
The problem is, when all highlighted like this, the first keystroke -- say "T" in Tim, doesn't show up -- it just clears all of the highlighted text and leaves it blank. The next keystrokes all show up as designed.
If I don't use select all the first keystroke works fine.
So I guess the question is -- can anyone think of a way to fix this? I wouldn't figure the act of selection should cause this behavior. As of right now I'm just getting by without using the selection... but it looked SO NICE before. :)
Barring a fix (source or script!), can anyone think of a clever way to work around it using the Command callback? It is called during the first keystroke, but the keystroke letter isn't captured.
Thanks,
-Tim
Torque Owner Ehab Yosry Amer
http://www.torquepowered.com/community/resources/view/16215
it should do what u need in a better way :) (I didn't try it yet)