You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
___MainWindow__________________________________________________________________FrameforMenu|Frameforcontents-frame2|______________________|_____________________________________________||MenuItem1-TabId0|||FrameforTextfield|||MenuItem1-TabId1||||||MenuItem2-TabId2|||Label : ====TextField======-TabId5|||MenuItem3-TabId3|||_____________________________________________|||MenuItem4-TabId4||||______________________|||____________________________|___________________________________________________|// --- onVisible, or possible onActivate? ---------------------------------------------------frame2.onVisible(true){
ui.PutEvent(ui.Event{Type: ui.EventKey, Key: term.TabKey, Target: TabId5 })
}
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:
//--- tokenEdit is the edit field I am trying to make the cursor go to currently in my testingui.PutEvent(ui.Event{Type: ui.EventKey, Key: term.MouseLeft, Target: tokenEdit})
That didn't seem to work though.
The text was updated successfully, but these errors were encountered:
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.
The text was updated successfully, but these errors were encountered: