Welcome to the new Ogre Wiki!
If you haven't done so already, be sure to visit the Wiki Portal to read about how the wiki works. Especially the Ogre Wiki Overview page.
If you haven't done so already, be sure to visit the Wiki Portal to read about how the wiki works. Especially the Ogre Wiki Overview page.
Multilist filling example code
const MyGUI::IntSize & size = mMultilist->getClientCoord().size(); mMultilist->addColumn("Key", size.width / 2); mMultilist->addColumn("Value", size.width / 2); mMultilist->removeAllItems(); for (VectorStringPairs::iterator iterProperty = widgetContainer->mUserString.begin(); iterProperty != widgetContainer->mUserString.end(); ++iterProperty) { // add new line and set first element (column 0, aka "Key") in this line mMultilist->addItem(iterProperty->first); // set item at 1st column (aka "Value") last line (mMultilist->getItemCount() - 1) mMultilist->setSubItemNameAt(1, mMultilist->getItemCount() - 1, iterProperty->second); }
So addItem adds a line and 1st element of it. To set something in other columns you should use setSubItemNameAt.
Contributors to this page: jacmoe
and
Altren
.
Page last modified on Monday 27 of September, 2010 22:10:44 UTC by jacmoe
.
The content on this page is licensed under the terms of the Creative Commons Attribution-ShareAlike License.
As an exception, any source code contributed within the content is released into the Public Domain.
Sidebar
Search box
Online users
49
online users

