programm crash while "addItem" to a multilist

Crawler

03-06-2010 14:04:54

Hi all,
i want to add a item to a multilist, using the method "addItem" from the multilist. The Programm crash when it reaches the line of code.

_multiList = _myGUI->createWidget<MyGUI::MultiList>("MultiList", MyGUI::IntCoord(400, 400, 300, 100), MyGUI::Align::Center, "Main", "mList");
_multiList->setCaptionWithNewLine("Details");
_multiList->addColumn("InputDevice", 100);
_multiList->addColumn("Nick", 80);
_multiList->addColumn("Best Lap Time", 100);
_multiList->insertItemAt(2, "Klaus");


What did i wrong??
Also the Caption isn't shown.

Thanks!

my.name

03-06-2010 16:27:50

_multiList->insertItemAt(0, "Klaus");

Crawler

03-06-2010 20:33:46

thanks again my.name :)

But i still have 2 problems.

1) why can't i set the caption(or is there no posibility to do that, is it not displayed)?
2) how can i insert an item in a nother column?

thanks...

my.name

03-06-2010 22:36:01

setSubItemNameAt(0, 0, "column0 line0");
setSubItemNameAt(1, 0, "column1 line0");