Page 1 of 1
[Solved] Selecting a Combobox programmatically
Posted: Tue Apr 05, 2016 15:19
by Gykonik
Hello, is there a way, how I can select a combobox directly, after it gets displayed? (Via a window and if the window shows up the combobox should be selected, so the user can type in things directly)...?
Re: Select Combobox
Posted: Tue Apr 05, 2016 16:09
by lucebac
You can call
activate() on each window:
http://static.cegui.org.uk/docs/0.8.5/c ... 8ed88491e5To have a function calling
activate() on a child window automatically when the parent window e.g. gets focus, you need to register a proper event listenener on the parent and call
activate() from within the event callback.
Re: Select Combobox
Posted: Wed Apr 06, 2016 14:43
by Gykonik
Thanks, and do I have to deactivate it again, if a player has clicked the Exit (x) key of the window?
And is there a way, how I can say, that if I activate the box the cursor should jump to the last position of my string?
Re: Select Combobox
Posted: Sat Apr 09, 2016 09:27
by Ident
Subscribe to the activation events and jump with the selection to the last position in the string inside the evend handler you write.