I was wondering if anyone can tell me what setItemSelectState of a Combobox is suppose to do? From my understanding it would select or deselect an item in the combobox, plus then if it selects it setting the editbox part to the items text if its a text item. No?
Thanks for the help.
-Jay
Combobox's setItemSelectState doesn't work???
Moderators: CEGUI MVP, CEGUI Team
- CrazyEddie
- CEGUI Project Lead
- Posts: 6760
- Joined: Wed Jan 12, 2005 12:06
- Location: England
- Contact:
Re: Comboboxs setItemSelectState doesnt work???
Before I answer the question, I'll just say that I'm almost convinced to write another Combobox implementation. Over the time this has been available, it's had more points raised about it than any other - so I now think the best idea is to code another one which does what everybody thinks it should
The thing with the current implementation is that the 'selected' item is only valid while the drop-list is visible. I used an implementation whereby I gave significance to the contents of the editbox potion of the widget above all else, over the months I have come to realise that this is not what most people expected.
setItemSelectState is a proxy method to the underlying listbox method with the same name. It's purpose is to allow you to specify the select state of a list item (which for Combobox means nothing if the list is not presently shown). It's use is recommended over setting the state on the ListboxItem directly, because it respects the selection options set on the Listbox (like Multi-select and what have you).
Anyway, sorry for the confusion caused by my funky Combobox. If I get a couple of days spare some time, I'll write another one which does things a bit differently
CE.
The thing with the current implementation is that the 'selected' item is only valid while the drop-list is visible. I used an implementation whereby I gave significance to the contents of the editbox potion of the widget above all else, over the months I have come to realise that this is not what most people expected.
setItemSelectState is a proxy method to the underlying listbox method with the same name. It's purpose is to allow you to specify the select state of a list item (which for Combobox means nothing if the list is not presently shown). It's use is recommended over setting the state on the ListboxItem directly, because it respects the selection options set on the Listbox (like Multi-select and what have you).
Anyway, sorry for the confusion caused by my funky Combobox. If I get a couple of days spare some time, I'll write another one which does things a bit differently
CE.
Useful Links: Forum Guidelines | Documentation | Tutorials | HOWTO | Videos | Donate to CEGUI | CEGUI Twitter
Re: Comboboxs setItemSelectState doesnt work???
The Reason why I say something is because I have multiple items in the combobox that can have the same name/text, so I need some other way of "selecting" an item in code then just setting the text of the combo box, cause it needs to be the correct indexed one, where setSelectSate seemed it would be perfect, or something like that.
Sorry for making you rewrite it...=(
Oh another note about the combo box, I may be the only one who feels this way so don't change it if it is, but there should be a way of setting the size of the dropdrop list instead of just setting the whole combo box size, this makes sizing the combo box to the size of other controls impossible. Maybe splitting those into 2 different properties ie Size would be for the combox(editbox part) and dropdownsize for the size of the drop down list part, maybe the dropdown part can only take a height size cause thats all you would need cause you would be bases it off the rest of the combo box parts.
Thanks CE.
-Jay
Sorry for making you rewrite it...=(
Oh another note about the combo box, I may be the only one who feels this way so don't change it if it is, but there should be a way of setting the size of the dropdrop list instead of just setting the whole combo box size, this makes sizing the combo box to the size of other controls impossible. Maybe splitting those into 2 different properties ie Size would be for the combox(editbox part) and dropdownsize for the size of the drop down list part, maybe the dropdown part can only take a height size cause thats all you would need cause you would be bases it off the rest of the combo box parts.
Thanks CE.
-Jay
- CrazyEddie
- CEGUI Project Lead
- Posts: 6760
- Joined: Wed Jan 12, 2005 12:06
- Location: England
- Contact:
Re: Comboboxs setItemSelectState doesnt work???
You're not the only one who feels that way about the set-up of the sizes.
I can't make any promises as to when this new version of the Combobox will be done. It shouldn't take too long once I start, I just have a few other bits which I must get done first
CE.
I can't make any promises as to when this new version of the Combobox will be done. It shouldn't take too long once I start, I just have a few other bits which I must get done first
CE.
Useful Links: Forum Guidelines | Documentation | Tutorials | HOWTO | Videos | Donate to CEGUI | CEGUI Twitter
Return to “Modifications / Integrations / Customisations”
Who is online
Users browsing this forum: No registered users and 0 guests