Page 1 of 1

Question about multicolumn + listbox.

Posted: Wed Feb 13, 2008 07:08
by ChowNutz
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?

Posted: Wed Feb 13, 2008 08:27
by scriptkid
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 :)

Posted: Wed Feb 13, 2008 12:04
by Rackle
There's also an example usage within WidgetGalore. That one is always a good starting point for simple widget questions.

Posted: Wed Feb 13, 2008 17:36
by ChowNutz
alright sweet all good now i got it thanks