Question about multicolumn + listbox.

For help with general CEGUI usage:
- Questions about the usage of CEGUI and its features, if not explained in the documentation.
- Problems with the CMAKE configuration or problems occuring during the build process/compilation.
- Errors or unexpected behaviour.

Moderators: CEGUI MVP, CEGUI Team

ChowNutz
Just popping in
Just popping in
Posts: 5
Joined: Tue Jan 29, 2008 07:20

Question about multicolumn + listbox.

Postby ChowNutz » Wed Feb 13, 2008 07:08

K I'm working on keybinding gui... I used the cegui layout editor to create a multicolumnlist window with a listbox inside it. And then in code I went

Code: Select all

itemMultiColumnList = new CEGUI::ListboxTextItem("WALK", 2);
   itemMultiColumnList->setSelectionBrushImage("WindowsLook", "Background");
   itemMultiColumnList->setTextColours(CEGUI::colour( 0.0f, 0.0f, 0.0f ));
   mListBox->addItem(itemMultiColumnList);


and i created whole bunch of them but i can only put it into the first column. Is there a way to put WALK in the first column and the key "M" on the second column?

User avatar
scriptkid
Home away from home
Home away from home
Posts: 1178
Joined: Wed Jan 12, 2005 12:06
Location: The Hague, The Netherlands
Contact:

Postby scriptkid » Wed Feb 13, 2008 08:27

Hi,

not sure what you mean by 'with a listbox inside it'. You added a listbox as a child to a multicolumn list? That's not needed, the multi-list is enough.

However, in your code you must treat it as a table. Have a look at Sample7, and go to the method 'createListContent'. This shows a sample of how to put listitems into 'cells'.

Good luck :)
Check out my released snake game using Cegui!

Rackle
CEGUI Team (Retired)
Posts: 534
Joined: Mon Jan 16, 2006 11:59
Location: Montréal

Postby Rackle » Wed Feb 13, 2008 12:04

There's also an example usage within WidgetGalore. That one is always a good starting point for simple widget questions.

ChowNutz
Just popping in
Just popping in
Posts: 5
Joined: Tue Jan 29, 2008 07:20

Postby ChowNutz » Wed Feb 13, 2008 17:36

alright sweet all good now i got it thanks


Return to “Help”

Who is online

Users browsing this forum: No registered users and 5 guests