Question about using ComboBox

For help with anything that CEGUI doesn't offer straight out-of-the-box, e.g.:
- Implementation of new features, such as new Core classes, widgets, WindowRenderers, etc. ...
- Modification of any existing features for specific purposes
- Integration of CEGUI in new engines or frameworks and writing of new plugins (Renderer, Parser, ...) or modules

Moderators: CEGUI MVP, CEGUI Team

User avatar
kungfoomasta
Not too shy to talk
Not too shy to talk
Posts: 34
Joined: Wed Apr 06, 2005 08:25

Question about using ComboBox

Postby kungfoomasta » Tue Nov 29, 2005 04:42

In my program I'm using several comboboxes, and they each have about 5 items in them. My question is, is there a function, or what do I do, to make it so that a particular item is selected by default?

Say I have Combobox b. b has 5 items:
item1/item2/item3/item4/item5

I want my program to start up with item4 selected from the box. It won't always be item4 that is the default, so I don't want to hardcode the 4th item as the text of the box.
( don't want to do this: b->setText("Item4") )

Also, I tried using the "setItemSelectState(...)" function, and my program crashed. How is that function supposed to be used?

I did setItemSelectState((uint)0,true) and it crashed.

Thanks

Return to “Modifications / Integrations / Customisations”

Who is online

Users browsing this forum: No registered users and 8 guests