I've been trying for some time to make it so that a droplist inside a window will be focused upon showing the window, without clicking on it once. Selecting something from the list works from the first click, but the hovering doesn't . I tried
ParentWindow->show();
ParentWindow->activate();
DropList->activate();
but it's as if nothing happened. Isn't activate() supposed to mimic clicking functionality and give focus to a window ?
Current selection in a ComboDropList
Moderators: CEGUI MVP, CEGUI Team
- CrazyEddie
- CEGUI Project Lead
- Posts: 6760
- Joined: Wed Jan 12, 2005 12:06
- Location: England
- Contact:
Is the DropList added directly to the Window, as in, it's not part of a Combobox?
If that's so, while I'll not say you can't use ComboDropList in that manner, it was written with the intention that it be part of a Combobox.
If you are using the ComboDropList directly, can you give us some info about what kind of usage you have in mind, and how you're setting things up currently. If we can't offer useful solutions, we may be able to enhance the ComboDropList for future releases
CE.
If that's so, while I'll not say you can't use ComboDropList in that manner, it was written with the intention that it be part of a Combobox.
If you are using the ComboDropList directly, can you give us some info about what kind of usage you have in mind, and how you're setting things up currently. If we can't offer useful solutions, we may be able to enhance the ComboDropList for future releases
CE.
Well yeah, I don't use it inside a ComboBox because I need to highlight current selection BEFORE you click it, and I saw that I can't do that in a standard ListBox, because there the selection gets highlighted only AFTER you click. It's basically setting the selectionimage when you hover it, and that's what I need from it. The non-activation is just a side effect though 
- CrazyEddie
- CEGUI Project Lead
- Posts: 6760
- Joined: Wed Jan 12, 2005 12:06
- Location: England
- Contact:
Ok, thanks for clarifying. As previously stated the drop-list is very special case, and so its apparent behaviour as part of a combobox is not always what it appears to be from the outside.
Anyway, I think you'll get what you need if you enable the 'auto arming' for the list. Basically, when you click the list the first time you are 'arming' it for selection, with auto-arm enabled, it's basically permanently armed for selection.
See: ComboDropList::setAutoArmEnabled
FX:
HTH
CE
Anyway, I think you'll get what you need if you enable the 'auto arming' for the list. Basically, when you click the list the first time you are 'arming' it for selection, with auto-arm enabled, it's basically permanently armed for selection.
See: ComboDropList::setAutoArmEnabled
FX:
Code: Select all
// set auto-armed state for the list
mydroplist->setAutoArmEnabled(true);HTH
CE
Return to “Modifications / Integrations / Customisations”
Who is online
Users browsing this forum: No registered users and 6 guests
