Open MostHated opened 5 years ago
Have you tried something like ui.ActivateControl(window, tokenEdit)
? where window
is your Window that contains frame frame2
or settingsFrame
?
It seems to move the cursor there, but it wont let you type unless you physically click in the edit field. If you tab to it though, as soon as it lands on the field you can start typing.
Heya, I am trying to find a way to make it so that upon opening the application, or opening specific windows the cursor is placed explicitly within a field and you can begin typing in it without having to click on it first, but I have yet to find the magic combination to make it work.
I tried to see if this might work, but no such luck:
I tried to see if using term.KeyTab might work, but it tabs to the menu instead of within the current frame.
What could work is if there were identifiers/number order to the tabstops, and I could specify a target for the tab.
Something like the above, so upon frame2 becoming available it will automatically place the cursor into the text field so that someone can start typing without having to click, tab, etc manually, allowing much more fluid movement and less need of the mouse?
I see that there is a Target within the event struct, so I tried:
That didn't seem to work though.