[Solved] Selecting a Combobox programmatically
Moderators: CEGUI MVP, CEGUI Team
[Solved] Selecting a Combobox programmatically
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
You can call activate() on each window: http://static.cegui.org.uk/docs/0.8.5/c ... 8ed88491e5
To 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.
To 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
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?
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
Subscribe to the activation events and jump with the selection to the last position in the string inside the evend handler you write.
CrazyEddie: "I don't like GUIs"
Who is online
Users browsing this forum: No registered users and 13 guests