<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
		<id>http://cegui.org.uk/wiki/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Van</id>
		<title>CEGUI Wiki - Crazy Eddie's GUI System (Open Source) - User contributions [en]</title>
		<link rel="self" type="application/atom+xml" href="http://cegui.org.uk/wiki/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Van"/>
		<link rel="alternate" type="text/html" href="http://cegui.org.uk/wiki/Special:Contributions/Van"/>
		<updated>2026-04-10T11:57:18Z</updated>
		<subtitle>User contributions</subtitle>
		<generator>MediaWiki 1.24.1</generator>

	<entry>
		<id>http://cegui.org.uk/wiki/index.php?title=Tooltips&amp;diff=1374</id>
		<title>Tooltips</title>
		<link rel="alternate" type="text/html" href="http://cegui.org.uk/wiki/index.php?title=Tooltips&amp;diff=1374"/>
				<updated>2005-10-09T13:51:02Z</updated>
		
		<summary type="html">&lt;p&gt;Van: /* How to display the ''Tooltip'' */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;I am not an expert but I would like to share what I have learned and gleaned about the ''Tooltip'' widget.&lt;br /&gt;
&lt;br /&gt;
API References:&lt;br /&gt;
[http://www.cegui.org.uk/api_reference/classCEGUI_1_1Tooltip.html Tooltip]&lt;br /&gt;
[http://www.cegui.org.uk/api_reference/classCEGUI_1_1System.html System]&lt;br /&gt;
&lt;br /&gt;
As you would expect, the ''Tooltip'' works very similar to most tooltip systems. Basically the user hovers the mouse over a CEGUI widget and when a specified time has elapsed the tooltip is displayed for a specified amount of time. As with most of the CEGUI widgets the ''Tooltip'' widget is based upon the CEGUI ''Window'' class widget.&lt;br /&gt;
&lt;br /&gt;
''Please note that the following example source code was gleaned and edited from project specific code so there may be some syntax errors.''&lt;br /&gt;
&lt;br /&gt;
== Creating the Default System ''Tootip'' widget ==&lt;br /&gt;
&lt;br /&gt;
CEGUI will manage a single default, system wide ''Tooltip'' widget for you that will take care of displaying your tooltip text. You have to initialize it by calling '''CEGUI::System::setTooltip()'' one time, somehwere in your code. I would recommend calling this right after initializing the CEGUI system. Here's a sample call:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  // Create default ToolTip item&lt;br /&gt;
  CEGUI::System::getSingleton().setTooltip( (CEGUI::utf8*)&amp;quot;TaharezLook/Tooltip&amp;quot; );&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Yep, that's all there is too it.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Setting the ''Tootip'' text to display ==&lt;br /&gt;
&lt;br /&gt;
There are two methods for setting your tooltip text: In your code or in your layout file.&lt;br /&gt;
&lt;br /&gt;
'''Setting the ''Tooltip'' text in your code'''&lt;br /&gt;
&lt;br /&gt;
You can hardcode toolip text in your code by using the ''WindowObject::setTooltipText()'' function like so:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
CEGUI::PushButton *mPushButton = (CEGUI::PushButton *)mWinMgr-&amp;gt;createWindow(&lt;br /&gt;
(CEGUI::utf8*)&amp;quot;TaharezLook/PushButton&amp;quot;, (CEGUI::utf8*)&amp;quot;PushButton&amp;quot;);&lt;br /&gt;
// Set other properties like size, position, etc.&lt;br /&gt;
mPushButton-&amp;gt;setTooltipText(&amp;quot;This is a tooltip.&amp;quot;);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Setting the ''Tooltip'' text in your layout (xml) file'''&lt;br /&gt;
&lt;br /&gt;
The prefered method is to set the tooltip text in your layout file and you can do it like so:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;Window Type=&amp;quot;TaharezLook/Editbox&amp;quot; Name=&amp;quot;Login/EditBox/Password&amp;quot;&amp;gt;&lt;br /&gt;
	&amp;lt;Property Name=&amp;quot;AbsoluteRect&amp;quot; Value=&amp;quot;l:128.000000 t:0.000000 r:486.000000 b:46.000000&amp;quot; /&amp;gt;&lt;br /&gt;
	&amp;lt;Property Name=&amp;quot;AlwaysOnTop&amp;quot; Value=&amp;quot;True&amp;quot; /&amp;gt;&lt;br /&gt;
	&amp;lt;Property Name=&amp;quot;RelativeRect&amp;quot; Value=&amp;quot;l:0.250000 t:0.000000 r:0.950000 b:1.000000&amp;quot; /&amp;gt;&lt;br /&gt;
	&amp;lt;Property Name=&amp;quot;Text&amp;quot; Value=&amp;quot;{Enter Password Here}&amp;quot; /&amp;gt;&lt;br /&gt;
	&amp;lt;Property Name=&amp;quot;Tooltip&amp;quot; Value=&amp;quot;Enter your password here.&amp;quot; /&amp;gt;&lt;br /&gt;
&amp;lt;/Window&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== How to display the ''Tooltip'' ==&lt;br /&gt;
&lt;br /&gt;
'''Inject Time Pulse'''&lt;br /&gt;
&lt;br /&gt;
''CEGUI::System::injectTimePulse(float timeElapsed)''&lt;br /&gt;
&lt;br /&gt;
This is a very important piece of information that is not well documented in the current CEGUI system: ''Time Pulse Injection''. The CEGUI system, to my knowledge, does not keep track of time for you by itself - it needs help. You must inject into the CEGUI System elapsed time. If you don't do this, then your ''Tooltip'' and other time sensitive window events (like fades, etc) will not work or will not work properly. What is the ''value'' you inject? The ''value'' should be the amount of time that has elapsed since the previous injection call. Refer to the ''CEGUI::System::injectTimePulse()''. The best place to inject a time pulse into the CEGUI system is in a main loop. Here are a couple of examples of how to implement this:&lt;br /&gt;
&lt;br /&gt;
'''Inject Time Pulse: via a MAIN Loop'''&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
#include &amp;lt;time.h&amp;gt;&lt;br /&gt;
...&lt;br /&gt;
clock_t mLastTimeInjection=clock();&lt;br /&gt;
...&lt;br /&gt;
// Your main loop&lt;br /&gt;
while ( true )&lt;br /&gt;
{&lt;br /&gt;
  ...&lt;br /&gt;
  // Make sure the CEGUI System is initialized and running&lt;br /&gt;
  // and if it is, inject a time pulse&lt;br /&gt;
  if ( CEGUI::System::getSingletonPtr() )&lt;br /&gt;
  {&lt;br /&gt;
    CEGUI::System::getSingleton().injectTimePulse( ( clock() - mLastTimeInjection ) * 0.001f );&lt;br /&gt;
    mLastTimeInjection = clock();&lt;br /&gt;
  } // CEGUI Time pulse&lt;br /&gt;
  ...&lt;br /&gt;
} // while&lt;br /&gt;
...&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Inject Time Pulse: via an Ogre::FrameListenter'''&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
bool clsMyFrameListener::frameStarted(const Ogre::FrameEvent&amp;amp; evt)&lt;br /&gt;
{ &lt;br /&gt;
  ...&lt;br /&gt;
  // Make sure the CEGUI System is initialized and running&lt;br /&gt;
  // and if it is, inject a time pulse&lt;br /&gt;
  if ( CEGUI::System::getSingletonPtr() )&lt;br /&gt;
    CEGUI::System::getSingleton().injectTimePulse( evt.timeSinceLastFrame );&lt;br /&gt;
  ...&lt;br /&gt;
  return true;&lt;br /&gt;
} //frameStarted&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The finer the resolution of the injection, the better your fades will look. Injecting time every one second or greater will make your ''fades'' just popup instead of ''fading'' in.&lt;br /&gt;
&lt;br /&gt;
== Conclusion ==&lt;br /&gt;
&lt;br /&gt;
That's really all there is to it. My biggest ''gotcha'' was the not knowing about the ''CEGUI::System::injectTimePulse()'' and how important it was. Once I stumbled upon that everything else fell into place.&lt;br /&gt;
&lt;br /&gt;
Some advanced notes. You can have more than one ''Tooltip'' widget. There maybe some scenerios where just one ''Tooltip'' widget won't work (like for a different look and feel from that of the default one, etc.). You can create another ''Tooltip'' widget using the standard CEGUI method for creating all the window widgets then use the ''CEGUI::Window::setToolTip()'' function to set the widget to use the desired ''Tooltip''.&lt;/div&gt;</summary>
		<author><name>Van</name></author>	</entry>

	<entry>
		<id>http://cegui.org.uk/wiki/index.php?title=Main_Page&amp;diff=296</id>
		<title>Main Page</title>
		<link rel="alternate" type="text/html" href="http://cegui.org.uk/wiki/index.php?title=Main_Page&amp;diff=296"/>
				<updated>2005-10-09T13:49:10Z</updated>
		
		<summary type="html">&lt;p&gt;Van: /* Getting Started */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{| border=&amp;quot;1&amp;quot; cellpadding=&amp;quot;5&amp;quot; cellspacing=&amp;quot;0&amp;quot; align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot;&lt;br /&gt;
|+'''Welcome to CEGUIWiki!'''&lt;br /&gt;
|-&lt;br /&gt;
| align=&amp;quot;center&amp;quot; style=&amp;quot;background:#eeffee;&amp;quot; | This is a wiki for [http://www.cegui.org.uk Crazy Eddie's GUI System] - The free GUI library for games and multi-media development. &lt;br /&gt;
What you will find here is a repository of documentation, samples, and other such materials created and maintained by the CEGUI community, for the benefit of the CEGUI community.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== What's New in the Wiki ==&lt;br /&gt;
&lt;br /&gt;
* How-To: [[MultiColumnList]]&lt;br /&gt;
* How-To: [[Tooltips]]&lt;br /&gt;
&lt;br /&gt;
== Getting Started ==&lt;br /&gt;
&lt;br /&gt;
* [[What is CEGUI]]?&lt;br /&gt;
* [[FAQ|Frequently Asked Questions]]&lt;br /&gt;
* [[Tutorials]]&lt;br /&gt;
* [[CodeSnippets]]&lt;br /&gt;
* [[HOW-TO series]]&lt;br /&gt;
* [[&amp;quot;Falagard&amp;quot; Skinning System Documentation]]&lt;br /&gt;
* [[The &amp;quot;official&amp;quot; layout editor]]&lt;br /&gt;
&lt;br /&gt;
== Development Information ==&lt;br /&gt;
* [[Development Roadmap]]&lt;br /&gt;
* [[Falagard Changes Information]] - some notes relating to what has changed for the &amp;quot;Falagard&amp;quot; system changes.&lt;/div&gt;</summary>
		<author><name>Van</name></author>	</entry>

	<entry>
		<id>http://cegui.org.uk/wiki/index.php?title=Main_Page&amp;diff=294</id>
		<title>Main Page</title>
		<link rel="alternate" type="text/html" href="http://cegui.org.uk/wiki/index.php?title=Main_Page&amp;diff=294"/>
				<updated>2005-10-09T13:48:54Z</updated>
		
		<summary type="html">&lt;p&gt;Van: /* Getting Started */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{| border=&amp;quot;1&amp;quot; cellpadding=&amp;quot;5&amp;quot; cellspacing=&amp;quot;0&amp;quot; align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot;&lt;br /&gt;
|+'''Welcome to CEGUIWiki!'''&lt;br /&gt;
|-&lt;br /&gt;
| align=&amp;quot;center&amp;quot; style=&amp;quot;background:#eeffee;&amp;quot; | This is a wiki for [http://www.cegui.org.uk Crazy Eddie's GUI System] - The free GUI library for games and multi-media development. &lt;br /&gt;
What you will find here is a repository of documentation, samples, and other such materials created and maintained by the CEGUI community, for the benefit of the CEGUI community.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== What's New in the Wiki ==&lt;br /&gt;
&lt;br /&gt;
* How-To: [[MultiColumnList]]&lt;br /&gt;
* How-To: [[Tooltips]]&lt;br /&gt;
&lt;br /&gt;
== Getting Started ==&lt;br /&gt;
&lt;br /&gt;
* [[What is CEGUI]]?&lt;br /&gt;
* [[FAQ|Frequently Asked Questions]]&lt;br /&gt;
* [[Tutorials]]&lt;br /&gt;
* [[CodeSnippets]]&lt;br /&gt;
* [[HOW-TO series]] : Minimal HOW-TOs&lt;br /&gt;
* [[&amp;quot;Falagard&amp;quot; Skinning System Documentation]]&lt;br /&gt;
* [[The &amp;quot;official&amp;quot; layout editor]]&lt;br /&gt;
&lt;br /&gt;
== Development Information ==&lt;br /&gt;
* [[Development Roadmap]]&lt;br /&gt;
* [[Falagard Changes Information]] - some notes relating to what has changed for the &amp;quot;Falagard&amp;quot; system changes.&lt;/div&gt;</summary>
		<author><name>Van</name></author>	</entry>

	<entry>
		<id>http://cegui.org.uk/wiki/index.php?title=Main_Page&amp;diff=293</id>
		<title>Main Page</title>
		<link rel="alternate" type="text/html" href="http://cegui.org.uk/wiki/index.php?title=Main_Page&amp;diff=293"/>
				<updated>2005-10-09T13:41:07Z</updated>
		
		<summary type="html">&lt;p&gt;Van: /* What's New in the Wiki */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{| border=&amp;quot;1&amp;quot; cellpadding=&amp;quot;5&amp;quot; cellspacing=&amp;quot;0&amp;quot; align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot;&lt;br /&gt;
|+'''Welcome to CEGUIWiki!'''&lt;br /&gt;
|-&lt;br /&gt;
| align=&amp;quot;center&amp;quot; style=&amp;quot;background:#eeffee;&amp;quot; | This is a wiki for [http://www.cegui.org.uk Crazy Eddie's GUI System] - The free GUI library for games and multi-media development. &lt;br /&gt;
What you will find here is a repository of documentation, samples, and other such materials created and maintained by the CEGUI community, for the benefit of the CEGUI community.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== What's New in the Wiki ==&lt;br /&gt;
&lt;br /&gt;
* How-To: [[MultiColumnList]]&lt;br /&gt;
* How-To: [[Tooltips]]&lt;br /&gt;
&lt;br /&gt;
== Getting Started ==&lt;br /&gt;
&lt;br /&gt;
* [[What is CEGUI]]?&lt;br /&gt;
* [[FAQ|Frequently Asked Questions]]&lt;br /&gt;
* [[Tutorials]]&lt;br /&gt;
* [[CodeSnippets]]&lt;br /&gt;
* [[&amp;quot;Falagard&amp;quot; Skinning System Documentation]]&lt;br /&gt;
* [[The &amp;quot;official&amp;quot; layout editor]]&lt;br /&gt;
&lt;br /&gt;
== Development Information ==&lt;br /&gt;
* [[Development Roadmap]]&lt;br /&gt;
* [[Falagard Changes Information]] - some notes relating to what has changed for the &amp;quot;Falagard&amp;quot; system changes.&lt;/div&gt;</summary>
		<author><name>Van</name></author>	</entry>

	<entry>
		<id>http://cegui.org.uk/wiki/index.php?title=Main_Page&amp;diff=292</id>
		<title>Main Page</title>
		<link rel="alternate" type="text/html" href="http://cegui.org.uk/wiki/index.php?title=Main_Page&amp;diff=292"/>
				<updated>2005-10-09T13:40:46Z</updated>
		
		<summary type="html">&lt;p&gt;Van: /* What's New in the Wiki */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{| border=&amp;quot;1&amp;quot; cellpadding=&amp;quot;5&amp;quot; cellspacing=&amp;quot;0&amp;quot; align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot;&lt;br /&gt;
|+'''Welcome to CEGUIWiki!'''&lt;br /&gt;
|-&lt;br /&gt;
| align=&amp;quot;center&amp;quot; style=&amp;quot;background:#eeffee;&amp;quot; | This is a wiki for [http://www.cegui.org.uk Crazy Eddie's GUI System] - The free GUI library for games and multi-media development. &lt;br /&gt;
What you will find here is a repository of documentation, samples, and other such materials created and maintained by the CEGUI community, for the benefit of the CEGUI community.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== What's New in the Wiki ==&lt;br /&gt;
&lt;br /&gt;
* How-To: [[MultiColumnList]]&lt;br /&gt;
* How-To: [[Tooltip]]&lt;br /&gt;
&lt;br /&gt;
== Getting Started ==&lt;br /&gt;
&lt;br /&gt;
* [[What is CEGUI]]?&lt;br /&gt;
* [[FAQ|Frequently Asked Questions]]&lt;br /&gt;
* [[Tutorials]]&lt;br /&gt;
* [[CodeSnippets]]&lt;br /&gt;
* [[&amp;quot;Falagard&amp;quot; Skinning System Documentation]]&lt;br /&gt;
* [[The &amp;quot;official&amp;quot; layout editor]]&lt;br /&gt;
&lt;br /&gt;
== Development Information ==&lt;br /&gt;
* [[Development Roadmap]]&lt;br /&gt;
* [[Falagard Changes Information]] - some notes relating to what has changed for the &amp;quot;Falagard&amp;quot; system changes.&lt;/div&gt;</summary>
		<author><name>Van</name></author>	</entry>

	<entry>
		<id>http://cegui.org.uk/wiki/index.php?title=Tooltips&amp;diff=295</id>
		<title>Tooltips</title>
		<link rel="alternate" type="text/html" href="http://cegui.org.uk/wiki/index.php?title=Tooltips&amp;diff=295"/>
				<updated>2005-10-09T13:37:09Z</updated>
		
		<summary type="html">&lt;p&gt;Van: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;I am not an expert but I would like to share what I have learned and gleaned about the ''Tooltip'' widget.&lt;br /&gt;
&lt;br /&gt;
API References:&lt;br /&gt;
[http://www.cegui.org.uk/api_reference/classCEGUI_1_1Tooltip.html Tooltip]&lt;br /&gt;
[http://www.cegui.org.uk/api_reference/classCEGUI_1_1System.html System]&lt;br /&gt;
&lt;br /&gt;
As you would expect, the ''Tooltip'' works very similar to most tooltip systems. Basically the user hovers the mouse over a CEGUI widget and when a specified time has elapsed the tooltip is displayed for a specified amount of time. As with most of the CEGUI widgets the ''Tooltip'' widget is based upon the CEGUI ''Window'' class widget.&lt;br /&gt;
&lt;br /&gt;
''Please note that the following example source code was gleaned and edited from project specific code so there may be some syntax errors.''&lt;br /&gt;
&lt;br /&gt;
== Creating the Default System ''Tootip'' widget ==&lt;br /&gt;
&lt;br /&gt;
CEGUI will manage a single default, system wide ''Tooltip'' widget for you that will take care of displaying your tooltip text. You have to initialize it by calling '''CEGUI::System::setTooltip()'' one time, somehwere in your code. I would recommend calling this right after initializing the CEGUI system. Here's a sample call:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  // Create default ToolTip item&lt;br /&gt;
  CEGUI::System::getSingleton().setTooltip( (CEGUI::utf8*)&amp;quot;TaharezLook/Tooltip&amp;quot; );&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Yep, that's all there is too it.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Setting the ''Tootip'' text to display ==&lt;br /&gt;
&lt;br /&gt;
There are two methods for setting your tooltip text: In your code or in your layout file.&lt;br /&gt;
&lt;br /&gt;
'''Setting the ''Tooltip'' text in your code'''&lt;br /&gt;
&lt;br /&gt;
You can hardcode toolip text in your code by using the ''WindowObject::setTooltipText()'' function like so:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
CEGUI::PushButton *mPushButton = (CEGUI::PushButton *)mWinMgr-&amp;gt;createWindow(&lt;br /&gt;
(CEGUI::utf8*)&amp;quot;TaharezLook/PushButton&amp;quot;, (CEGUI::utf8*)&amp;quot;PushButton&amp;quot;);&lt;br /&gt;
// Set other properties like size, position, etc.&lt;br /&gt;
mPushButton-&amp;gt;setTooltipText(&amp;quot;This is a tooltip.&amp;quot;);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Setting the ''Tooltip'' text in your layout (xml) file'''&lt;br /&gt;
&lt;br /&gt;
The prefered method is to set the tooltip text in your layout file and you can do it like so:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;Window Type=&amp;quot;TaharezLook/Editbox&amp;quot; Name=&amp;quot;Login/EditBox/Password&amp;quot;&amp;gt;&lt;br /&gt;
	&amp;lt;Property Name=&amp;quot;AbsoluteRect&amp;quot; Value=&amp;quot;l:128.000000 t:0.000000 r:486.000000 b:46.000000&amp;quot; /&amp;gt;&lt;br /&gt;
	&amp;lt;Property Name=&amp;quot;AlwaysOnTop&amp;quot; Value=&amp;quot;True&amp;quot; /&amp;gt;&lt;br /&gt;
	&amp;lt;Property Name=&amp;quot;RelativeRect&amp;quot; Value=&amp;quot;l:0.250000 t:0.000000 r:0.950000 b:1.000000&amp;quot; /&amp;gt;&lt;br /&gt;
	&amp;lt;Property Name=&amp;quot;Text&amp;quot; Value=&amp;quot;{Enter Password Here}&amp;quot; /&amp;gt;&lt;br /&gt;
	&amp;lt;Property Name=&amp;quot;Tooltip&amp;quot; Value=&amp;quot;Enter your password here.&amp;quot; /&amp;gt;&lt;br /&gt;
&amp;lt;/Window&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== How to display the ''Tooltip'' ==&lt;br /&gt;
&lt;br /&gt;
'''Inject Time Pulse'''&lt;br /&gt;
&lt;br /&gt;
''CEGUI::System::injectTimePulse(float timeElapsed)''&lt;br /&gt;
&lt;br /&gt;
This is a very important piece of information that is not well documented in the current CEGUI system: ''Time Pulse Injection''. The CEGUI system, to my knowledge, does not keep track of time for you by itself - it needs help. You must inject into the CEGUI System elapsed time. If you don't do this, then your ''Tooltip'' and other time sensitive window events (like fades, etc) will not work or will not work properly. What is the ''value'' you inject? The ''value'' should be the amount of time that has elapsed since the previous injection call. Refer to the ''CEGUI::System::injectTimePulse()''. The best place to inject a time pulse into the CEGUI system is in a main loop. Here are a couple of examples of how to implement this:&lt;br /&gt;
&lt;br /&gt;
'''Inject Time Pulse: via a MAIN Loop'''&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
#include &amp;lt;time.h&amp;gt;&lt;br /&gt;
...&lt;br /&gt;
clock_t mLastTimeInjection=clock();&lt;br /&gt;
...&lt;br /&gt;
// Your main loop&lt;br /&gt;
while ( true )&lt;br /&gt;
{&lt;br /&gt;
  ...&lt;br /&gt;
  // Make sure the CEGUI System is initialized and running&lt;br /&gt;
  // and if it is, inject a time pulse&lt;br /&gt;
  if ( CEGUI::System::getSingletonPtr() )&lt;br /&gt;
  {&lt;br /&gt;
    CEGUI::System::injectTimePulse( ( clock() - mLastTimeInjection ) * 0.001f );&lt;br /&gt;
    mLastTimeInjection = clock();&lt;br /&gt;
  } // CEGUI Time pulse&lt;br /&gt;
  ...&lt;br /&gt;
} // while&lt;br /&gt;
...&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Inject Time Pulse: via an Ogre::FrameListenter'''&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
bool clsMyFrameListener::frameStarted(const Ogre::FrameEvent&amp;amp; evt)&lt;br /&gt;
{ &lt;br /&gt;
  ...&lt;br /&gt;
  // Make sure the CEGUI System is initialized and running&lt;br /&gt;
  // and if it is, inject a time pulse&lt;br /&gt;
  if ( CEGUI::System::getSingletonPtr() )&lt;br /&gt;
    CEGUI::System::injectTimePulse( evt.timeSinceLastFrame );&lt;br /&gt;
  ...&lt;br /&gt;
  return true;&lt;br /&gt;
} //frameStarted&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The finer the resolution of the injection, the better your fades will look. Injecting time every one second or greater will make your ''fades'' just popup instead of ''fading'' in.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Conclusion ==&lt;br /&gt;
&lt;br /&gt;
That's really all there is to it. My biggest ''gotcha'' was the not knowing about the ''CEGUI::System::injectTimePulse()'' and how important it was. Once I stumbled upon that everything else fell into place.&lt;br /&gt;
&lt;br /&gt;
Some advanced notes. You can have more than one ''Tooltip'' widget. There maybe some scenerios where just one ''Tooltip'' widget won't work (like for a different look and feel from that of the default one, etc.). You can create another ''Tooltip'' widget using the standard CEGUI method for creating all the window widgets then use the ''CEGUI::Window::setToolTip()'' function to set the widget to use the desired ''Tooltip''.&lt;/div&gt;</summary>
		<author><name>Van</name></author>	</entry>

	<entry>
		<id>http://cegui.org.uk/wiki/index.php?title=MultiColumnList&amp;diff=216</id>
		<title>MultiColumnList</title>
		<link rel="alternate" type="text/html" href="http://cegui.org.uk/wiki/index.php?title=MultiColumnList&amp;diff=216"/>
				<updated>2005-09-27T15:46:00Z</updated>
		
		<summary type="html">&lt;p&gt;Van: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Since I have been harping about documentation in the forums, I thought it best that I put my money where my mouth is. I am not an expert but I would like to share what I have learned and gleaned about the ''MultiColumnList'' widget.&lt;br /&gt;
&lt;br /&gt;
If you are familiar with the ''Listbox'' widget then the ''MultiColumnList'' will be a natural progression for you. The one thing you need to remember is that every column entry in the ''MultiColumnList'' will have its own instance of a ''ListboxItem'' or ''ListboxTextItem''. The ''MultiColumnList'' has some very nice features built directly into the widged. By default your users can: a) re-arrange the column display order; b) sort (Ascending and Descending) rows by a column; c) change the width of a column. These features can be disabled.&lt;br /&gt;
&lt;br /&gt;
API References:&lt;br /&gt;
[http://www.cegui.org.uk/api_reference/classCEGUI_1_1MultiColumnList.html MultiColumnList]&lt;br /&gt;
[http://www.cegui.org.uk/api_reference/classCEGUI_1_1ListboxItem.html ListboxItem]&lt;br /&gt;
[http://www.cegui.org.uk/api_reference/classCEGUI_1_1ListboxTextItem.html ListboxTextItem]&lt;br /&gt;
[http://www.cegui.org.uk/api_reference/classCEGUI_1_1WindowManager.html WindowManager]&lt;br /&gt;
&lt;br /&gt;
''Please note that the following example source code was gleaned and edited from project specific code so there may be some syntax errors.''&lt;br /&gt;
&lt;br /&gt;
== Creating the ''MultiColumnList'' in code ==&lt;br /&gt;
&lt;br /&gt;
Take a look at this code on how we create the ''MultiColumnList'' window:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
// Get the CEGUI Window Manager&lt;br /&gt;
CEGUI::WindowManager *mWinMgr = CEGUI::WindowManager::getSingletonPtr();&lt;br /&gt;
&lt;br /&gt;
// Create the CEGUI MultiColumnList window&lt;br /&gt;
CEGUI::MultiColumnList *mListBox = (CEGUI::MultiColumnList *)mWinMgr-&amp;gt;createWindow(&lt;br /&gt;
(CEGUI::utf8*)CEGUILOOK&amp;quot;/MultiColumnList&amp;quot;, (CEGUI::utf8*)&amp;quot;MyListBox&amp;quot;);&lt;br /&gt;
// Don't forget to add this window to another window and set its other properties&lt;br /&gt;
// like position, size, etc. Use the methods you prefer.&lt;br /&gt;
mListBox-&amp;gt;setPosition( CEGUI::Point(0.05f, 0.1f) );&lt;br /&gt;
mListBox-&amp;gt;setSize( CEGUI::Size(0.90f, 0.80f) );&lt;br /&gt;
// mSomeWindow-&amp;gt;addChild(mListBox);&lt;br /&gt;
&lt;br /&gt;
// Set the users selection ability&lt;br /&gt;
mListBox-&amp;gt;setSelectionMode(CEGUI::MultiColumnList::SelectionMode::RowMultiple);&lt;br /&gt;
&lt;br /&gt;
// Add some column headers&lt;br /&gt;
mListBox-&amp;gt;addColumn(&amp;quot;Column1&amp;quot;, 0, 0.10f);&lt;br /&gt;
mListBox-&amp;gt;addColumn(&amp;quot;Column2&amp;quot;, 1, 0.25f);&lt;br /&gt;
mListBox-&amp;gt;addColumn(&amp;quot;Column3&amp;quot;, 2, 0.25f);&lt;br /&gt;
mListBox-&amp;gt;addColumn(&amp;quot;Column4&amp;quot;, 3, 0.45f);&lt;br /&gt;
&lt;br /&gt;
// I don't know why, but you have set the column header widths via this function.&lt;br /&gt;
// The Column Header widths are not assumed from the &amp;quot;addColumn&amp;quot; function. Bug?&lt;br /&gt;
mListBox-&amp;gt;setColumnHeaderWidth(0, 0.10f);&lt;br /&gt;
mListBox-&amp;gt;setColumnHeaderWidth(1, 0.25f);&lt;br /&gt;
mListBox-&amp;gt;setColumnHeaderWidth(2, 0.25f);&lt;br /&gt;
mListBox-&amp;gt;setColumnHeaderWidth(3, 0.45f);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Note these lines in the code:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
// I don't know why, but you have set the column header widths via this function.&lt;br /&gt;
// The Column Header widths are not assumed from the &amp;quot;addColumn&amp;quot; function. Bug?&lt;br /&gt;
mListBox-&amp;gt;setColumnHeaderWidth(0, 0.10f);&lt;br /&gt;
mListBox-&amp;gt;setColumnHeaderWidth(1, 0.25f);&lt;br /&gt;
mListBox-&amp;gt;setColumnHeaderWidth(2, 0.25f);&lt;br /&gt;
mListBox-&amp;gt;setColumnHeaderWidth(3, 0.45f);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you don't set the column header widths with the ''setColumnHeaderWidth()'' method then the columns will appear to be ''stacked'' on top of one another. This may be a bug in the library. The numbers I used for the widths are arbitrary. You can make them anything you like.&lt;br /&gt;
&lt;br /&gt;
'''!! WARNING !!''' Take note that you should '''not''' follow each ''addColumn()'' with a ''setColumnHeaderWidth()''. Create all the columns first and then set the column widths. Not following this will yield unreliable column size results.&lt;br /&gt;
&lt;br /&gt;
In other words '''DO NOT DO THIS'''&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
// Add some column headers&lt;br /&gt;
mListBox-&amp;gt;addColumn(&amp;quot;Column1&amp;quot;, 0, 0.10f);&lt;br /&gt;
mListBox-&amp;gt;setColumnHeaderWidth(0, 0.10f);&lt;br /&gt;
mListBox-&amp;gt;addColumn(&amp;quot;Column2&amp;quot;, 1, 0.25f);&lt;br /&gt;
mListBox-&amp;gt;setColumnHeaderWidth(1, 0.25f);&lt;br /&gt;
mListBox-&amp;gt;addColumn(&amp;quot;Column3&amp;quot;, 2, 0.25f);&lt;br /&gt;
mListBox-&amp;gt;setColumnHeaderWidth(2, 0.25f);&lt;br /&gt;
mListBox-&amp;gt;addColumn(&amp;quot;Column4&amp;quot;, 3, 0.45f);&lt;br /&gt;
mListBox-&amp;gt;setColumnHeaderWidth(3, 0.45f);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Adding Data ==&lt;br /&gt;
Now, lets create a method to add data to our ''MultiColumnList''. Review this code:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
void addListboxItem(char *c1, char *c2, char *c3, char *c4, bool isSelected)&lt;br /&gt;
{&lt;br /&gt;
  // First, we need to add a new row to the Listbox&lt;br /&gt;
  // mListBox is from the above code, its a class global pointer in my code.&lt;br /&gt;
  // If you want, you can singleton() the Listbox or pass the pointer to this function.&lt;br /&gt;
  unsigned int mRow = mListBox-&amp;gt;addRow();&lt;br /&gt;
&lt;br /&gt;
  // Remember, each column is a 'ListboxTextitem' so we need to&lt;br /&gt;
  // create a new instance for each column.&lt;br /&gt;
&lt;br /&gt;
  // Column1&lt;br /&gt;
  // Create our ListboxTextItem instance...&lt;br /&gt;
  CEGUI::ListboxTextItem* item = new CEGUI::ListboxTextItem((CEGUI::utf8*)c1, 0);&lt;br /&gt;
  // Note that in 'setItem' we specify '0' for the index/column we want this&lt;br /&gt;
  // ListboxTextItem to be attached too.&lt;br /&gt;
  mListBox-&amp;gt;setItem(item, 0, mRow);&lt;br /&gt;
  // Should it be selected? I know this appears weird but yes you can have columns be&lt;br /&gt;
  // selected or not selected. In other words, its not ROW based, its COLUMN based &lt;br /&gt;
  // selection. Why? more options and flexibilty!&lt;br /&gt;
  item-&amp;gt;setSelected(isSelected);&lt;br /&gt;
  // Don't forget to set the selection brush or your item won't get highlighted.&lt;br /&gt;
  item-&amp;gt;setSelectionBrushImage( (CEGUI::utf8*)&amp;quot;TaharezLook&amp;quot;, (CEGUI::utf8*)&amp;quot;MultiListSelectionBrush&amp;quot;);&lt;br /&gt;
  // You could attach some data to this column that is important to you by&lt;br /&gt;
  // using the 'setUserData' function. Each column could point to a different&lt;br /&gt;
  // user data source or the same user data source, or nothing at all.&lt;br /&gt;
  // item-&amp;gt;setUserData(MyPointerToSomeData);&lt;br /&gt;
&lt;br /&gt;
  // Column2&lt;br /&gt;
  item = new CEGUI::ListboxTextItem((CEGUI::utf8*)c2, 0);&lt;br /&gt;
  mListBox-&amp;gt;setItem(item, 1, mRow);&lt;br /&gt;
  item-&amp;gt;setSelected(isSelected);&lt;br /&gt;
  item-&amp;gt;setSelectionBrushImage( (CEGUI::utf8*)&amp;quot;TaharezLook&amp;quot;, (CEGUI::utf8*)&amp;quot;MultiListSelectionBrush&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
  // Column3&lt;br /&gt;
  item = new CEGUI::ListboxTextItem((CEGUI::utf8*)c3, 0);&lt;br /&gt;
  mListBox-&amp;gt;setItem(item, 2, mRow);&lt;br /&gt;
  item-&amp;gt;setSelected(isSelected);&lt;br /&gt;
  item-&amp;gt;setSelectionBrushImage( (CEGUI::utf8*)&amp;quot;TaharezLook&amp;quot;, (CEGUI::utf8*)&amp;quot;MultiListSelectionBrush&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
  //Column4&lt;br /&gt;
  item = new CEGUI::ListboxTextItem((CEGUI::utf8*)c4, 0);&lt;br /&gt;
  mListBox-&amp;gt;setItem(item, 3, mRow);&lt;br /&gt;
  item-&amp;gt;setSelected(isSelected);&lt;br /&gt;
  item-&amp;gt;setSelectionBrushImage( (CEGUI::utf8*)&amp;quot;TaharezLook&amp;quot;, (CEGUI::utf8*)&amp;quot;MultiListSelectionBrush&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
} // addListboxItem&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Now, somewhere in your code, call the ''addListboxItem'' function like this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  ...&lt;br /&gt;
  addListboxItem(&amp;quot;Item1 Col1&amp;quot;, &amp;quot;Item1 Col2&amp;quot;, &amp;quot;Item1 Col3&amp;quot;, &amp;quot;Item1 Col4&amp;quot;, true);&lt;br /&gt;
  addListboxItem(&amp;quot;Item2 Col1&amp;quot;, &amp;quot;Item2 Col2&amp;quot;, &amp;quot;Item2 Col3&amp;quot;, &amp;quot;Item2 Col4&amp;quot;, false);&lt;br /&gt;
  addListboxItem(&amp;quot;Item3 Col1&amp;quot;, &amp;quot;Item3 Col2&amp;quot;, &amp;quot;Item3 Col3&amp;quot;, &amp;quot;Item3 Col4&amp;quot;, false);&lt;br /&gt;
  addListboxItem(&amp;quot;Item4 Col1&amp;quot;, &amp;quot;Item4 Col2&amp;quot;, &amp;quot;Item4 Col3&amp;quot;, &amp;quot;Item4 Col4&amp;quot;, true);&lt;br /&gt;
  ...&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You will note that in the above source code I have specified two rows to be highlighted. This is possible because of the&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
mListBox-&amp;gt;setSelectionMode(CEGUI::MultiColumnList::SelectionMode::RowMultiple);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
statement from above. Review the API documentation about the ''setSelectionMode''. You can make it single row based or column based.&lt;br /&gt;
&lt;br /&gt;
Program this and give it a try. When you run your program don't forget to re-arrange the column order (drag and drop the column header), resize columns and double click a column header to sort the rows via the clicked column.&lt;br /&gt;
&lt;br /&gt;
== Other Notable Items ==&lt;br /&gt;
&lt;br /&gt;
'''At least one column is required.''' You '''must''' have defined at least one column using the ''addColumn()'' method or you will get an error when you attempt to insert a row using the ''addRow()'' funtion.&lt;br /&gt;
&lt;br /&gt;
'''Odd Column Sizes.''' After the window is created the columns may appear funny - that is, the columns and the data won't appear aligned. There appears to be an initial 'redraw' bug in the library. If you manually resize a column (yes, with the mouse like in windows) it will correct the column layout, spacing and alignment. Also remember that you should '''not''' follow each ''addColumn()'' with a ''setColumnHeaderWidth()''. Create all the columns first and then set the column widths. Not following this will yield unreliable column size results. See the example above.&lt;br /&gt;
&lt;br /&gt;
'''Drag and Drop.''' As of version 0.4.0 you can not use the CEGUI Drag and Drop feature with ''ListboxTextItem''. Drag and Drop only works with ''Window'' based widgets right now.&lt;/div&gt;</summary>
		<author><name>Van</name></author>	</entry>

	<entry>
		<id>http://cegui.org.uk/wiki/index.php?title=MultiColumnList&amp;diff=208</id>
		<title>MultiColumnList</title>
		<link rel="alternate" type="text/html" href="http://cegui.org.uk/wiki/index.php?title=MultiColumnList&amp;diff=208"/>
				<updated>2005-09-27T15:41:42Z</updated>
		
		<summary type="html">&lt;p&gt;Van: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Since I have been harping about documentation in the forums, I thought it best that I put my money where my mouth is. I am not an expert but I would like to share what I have learned and gleaned about the ''MultiColumnList'' widget.&lt;br /&gt;
&lt;br /&gt;
If you are familiar with the ''Listbox'' widget then the ''MultiColumnList'' will be a natural progression for you. The one thing you need to remember is that every column entry in the ''MultiColumnList'' will have its own instance of a ''ListboxItem'' or ''ListboxTextItem''. The ''MultiColumnList'' has some very nice features built directly into the widged. By default your users can: a) re-arrange the column display order; b) sort (Ascending and Descending) rows by a column; c) change the width of a column. These features can be disabled.&lt;br /&gt;
&lt;br /&gt;
API References:&lt;br /&gt;
[http://www.cegui.org.uk/api_reference/classCEGUI_1_1MultiColumnList.html MultiColumnList]&lt;br /&gt;
[http://www.cegui.org.uk/api_reference/classCEGUI_1_1ListboxItem.html ListboxItem]&lt;br /&gt;
[http://www.cegui.org.uk/api_reference/classCEGUI_1_1ListboxTextItem.html ListboxTextItem]&lt;br /&gt;
[http://www.cegui.org.uk/api_reference/classCEGUI_1_1WindowManager.html WindowManager]&lt;br /&gt;
&lt;br /&gt;
''Please note that the following example source code was gleaned and edited from project specific code so there may be some syntax errors.''&lt;br /&gt;
&lt;br /&gt;
== Creating the ''MultiColumnList'' in code ==&lt;br /&gt;
&lt;br /&gt;
Take a look at this code on how we create the ''MultiColumnList'' window:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
// Get the CEGUI Window Manager&lt;br /&gt;
CEGUI::WindowManager *mWinMgr = CEGUI::WindowManager::getSingletonPtr();&lt;br /&gt;
&lt;br /&gt;
// Create the CEGUI MultiColumnList window&lt;br /&gt;
CEGUI::MultiColumnList *mListBox = (CEGUI::MultiColumnList *)mWinMgr-&amp;gt;createWindow(&lt;br /&gt;
(CEGUI::utf8*)CEGUILOOK&amp;quot;/MultiColumnList&amp;quot;, (CEGUI::utf8*)&amp;quot;MyListBox&amp;quot;);&lt;br /&gt;
// Don't forget to add this window to another window and set its other properties&lt;br /&gt;
// like position, size, etc. Use the methods you prefer.&lt;br /&gt;
mListBox-&amp;gt;setPosition( CEGUI::Point(0.05f, 0.1f) );&lt;br /&gt;
mListBox-&amp;gt;setSize( CEGUI::Size(0.90f, 0.80f) );&lt;br /&gt;
// mSomeWindow-&amp;gt;addChild(mListBox);&lt;br /&gt;
&lt;br /&gt;
// Set the users selection ability&lt;br /&gt;
mListBox-&amp;gt;setSelectionMode(CEGUI::MultiColumnList::SelectionMode::RowMultiple);&lt;br /&gt;
&lt;br /&gt;
// Add some column headers&lt;br /&gt;
mListBox-&amp;gt;addColumn(&amp;quot;Column1&amp;quot;, 0, 0.10f);&lt;br /&gt;
mListBox-&amp;gt;addColumn(&amp;quot;Column2&amp;quot;, 1, 0.25f);&lt;br /&gt;
mListBox-&amp;gt;addColumn(&amp;quot;Column3&amp;quot;, 2, 0.25f);&lt;br /&gt;
mListBox-&amp;gt;addColumn(&amp;quot;Column4&amp;quot;, 3, 0.45f);&lt;br /&gt;
&lt;br /&gt;
// I don't know why, but you have set the column header widths via this function.&lt;br /&gt;
// The Column Header widths are not assumed from the &amp;quot;addColumn&amp;quot; function. Bug?&lt;br /&gt;
mListBox-&amp;gt;setColumnHeaderWidth(0, 0.10f);&lt;br /&gt;
mListBox-&amp;gt;setColumnHeaderWidth(1, 0.25f);&lt;br /&gt;
mListBox-&amp;gt;setColumnHeaderWidth(2, 0.25f);&lt;br /&gt;
mListBox-&amp;gt;setColumnHeaderWidth(3, 0.45f);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Note these lines in the code:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
// I don't know why, but you have set the column header widths via this function.&lt;br /&gt;
// The Column Header widths are not assumed from the &amp;quot;addColumn&amp;quot; function. Bug?&lt;br /&gt;
mListBox-&amp;gt;setColumnHeaderWidth(0, 0.10f);&lt;br /&gt;
mListBox-&amp;gt;setColumnHeaderWidth(1, 0.25f);&lt;br /&gt;
mListBox-&amp;gt;setColumnHeaderWidth(2, 0.25f);&lt;br /&gt;
mListBox-&amp;gt;setColumnHeaderWidth(3, 0.45f);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you don't set the column header widths with the ''setColumnHeaderWidth()'' method then the columns will appear to be ''stacked'' on top of one another. This may be a bug in the library. The numbers I used for the widths are arbitrary. You can make them anything you like.&lt;br /&gt;
&lt;br /&gt;
'''!! WARNING !!''' Take note that you should '''not''' follow each ''addColumn()'' with a ''setColumnHeaderWidth()''. Create all the columns first and then set the column widths. Not following this will yield unreliable column size results.&lt;br /&gt;
&lt;br /&gt;
In other words '''DO NOT DO THIS'''&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
// Add some column headers&lt;br /&gt;
mListBox-&amp;gt;addColumn(&amp;quot;Column1&amp;quot;, 0, 0.10f);&lt;br /&gt;
mListBox-&amp;gt;setColumnHeaderWidth(0, 0.10f);&lt;br /&gt;
mListBox-&amp;gt;addColumn(&amp;quot;Column2&amp;quot;, 1, 0.25f);&lt;br /&gt;
mListBox-&amp;gt;setColumnHeaderWidth(1, 0.25f);&lt;br /&gt;
mListBox-&amp;gt;addColumn(&amp;quot;Column3&amp;quot;, 2, 0.25f);&lt;br /&gt;
mListBox-&amp;gt;setColumnHeaderWidth(2, 0.25f);&lt;br /&gt;
mListBox-&amp;gt;addColumn(&amp;quot;Column4&amp;quot;, 3, 0.45f);&lt;br /&gt;
mListBox-&amp;gt;setColumnHeaderWidth(3, 0.45f);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Adding Data ==&lt;br /&gt;
Now, lets create a method to add data to our ''MultiColumnList''. Review this code:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
void addListboxItem(char *c1, char *c2, char *c3, char *c4, bool isSelected)&lt;br /&gt;
{&lt;br /&gt;
  // First, we need to add a new row to the Listbox&lt;br /&gt;
  // mListBox is from the above code, its a class global pointer in my code.&lt;br /&gt;
  // If you want, you can singleton() the Listbox or pass the pointer to this function.&lt;br /&gt;
  unsigned int mRow = mListBox-&amp;gt;addRow();&lt;br /&gt;
&lt;br /&gt;
  // Remember, each column is a 'ListboxTextitem' so we need to&lt;br /&gt;
  // create a new instance for each column.&lt;br /&gt;
&lt;br /&gt;
  // Column1&lt;br /&gt;
  // Create our ListboxTextItem instance...&lt;br /&gt;
  CEGUI::ListboxTextItem* item = new CEGUI::ListboxTextItem((CEGUI::utf8*)c1, 0);&lt;br /&gt;
  // Note that in 'setItem' we specify '0' for the index/column we want this&lt;br /&gt;
  // ListboxTextItem to be attached too.&lt;br /&gt;
  mListBox-&amp;gt;setItem(item, 0, mRow);&lt;br /&gt;
  // Should it be selected? I know this appears weird but yes you can have columns be&lt;br /&gt;
  // selected or not selected. In other words, its not ROW based, its COLUMN based &lt;br /&gt;
  // selection. Why? more options and flexibilty!&lt;br /&gt;
  item-&amp;gt;setSelected(isSelected);&lt;br /&gt;
  // Don't forget to set the selection brush or your item won't get highlighted.&lt;br /&gt;
  item-&amp;gt;setSelectionBrushImage( (CEGUI::utf8*)&amp;quot;TaharezLook&amp;quot;, (CEGUI::utf8*)GEGUI_SelectionBrushImage);&lt;br /&gt;
  // You could attach some data to this column that is important to you by&lt;br /&gt;
  // using the 'setUserData' function. Each column could point to a different&lt;br /&gt;
  // user data source or the same user data source, or nothing at all.&lt;br /&gt;
  // item-&amp;gt;setUserData(MyPointerToSomeData);&lt;br /&gt;
&lt;br /&gt;
  // Column2&lt;br /&gt;
  item = new CEGUI::ListboxTextItem((CEGUI::utf8*)c2, 0);&lt;br /&gt;
  mListBox-&amp;gt;setItem(item, 1, mRow);&lt;br /&gt;
  item-&amp;gt;setSelected(isSelected);&lt;br /&gt;
  item-&amp;gt;setSelectionBrushImage( (CEGUI::utf8*)&amp;quot;TaharezLook&amp;quot;, (CEGUI::utf8*)GEGUI_SelectionBrushImage);&lt;br /&gt;
&lt;br /&gt;
  // Column3&lt;br /&gt;
  item = new CEGUI::ListboxTextItem((CEGUI::utf8*)c3, 0);&lt;br /&gt;
  mListBox-&amp;gt;setItem(item, 2, mRow);&lt;br /&gt;
  item-&amp;gt;setSelected(isSelected);&lt;br /&gt;
  item-&amp;gt;setSelectionBrushImage( (CEGUI::utf8*)&amp;quot;TaharezLook&amp;quot;, (CEGUI::utf8*)GEGUI_SelectionBrushImage);&lt;br /&gt;
&lt;br /&gt;
  //Column4&lt;br /&gt;
  item = new CEGUI::ListboxTextItem((CEGUI::utf8*)c4, 0);&lt;br /&gt;
  mListBox-&amp;gt;setItem(item, 3, mRow);&lt;br /&gt;
  item-&amp;gt;setSelected(isSelected);&lt;br /&gt;
  item-&amp;gt;setSelectionBrushImage( (CEGUI::utf8*)&amp;quot;TaharezLook&amp;quot;, (CEGUI::utf8*)GEGUI_SelectionBrushImage);&lt;br /&gt;
&lt;br /&gt;
} // addListboxItem&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Now, somewhere in your code, call the ''addListboxItem'' function like this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  ...&lt;br /&gt;
  addListboxItem(&amp;quot;Item1 Col1&amp;quot;, &amp;quot;Item1 Col2&amp;quot;, &amp;quot;Item1 Col3&amp;quot;, &amp;quot;Item1 Col4&amp;quot;, true);&lt;br /&gt;
  addListboxItem(&amp;quot;Item2 Col1&amp;quot;, &amp;quot;Item2 Col2&amp;quot;, &amp;quot;Item2 Col3&amp;quot;, &amp;quot;Item2 Col4&amp;quot;, false);&lt;br /&gt;
  addListboxItem(&amp;quot;Item3 Col1&amp;quot;, &amp;quot;Item3 Col2&amp;quot;, &amp;quot;Item3 Col3&amp;quot;, &amp;quot;Item3 Col4&amp;quot;, false);&lt;br /&gt;
  addListboxItem(&amp;quot;Item4 Col1&amp;quot;, &amp;quot;Item4 Col2&amp;quot;, &amp;quot;Item4 Col3&amp;quot;, &amp;quot;Item4 Col4&amp;quot;, true);&lt;br /&gt;
  ...&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You will note that in the above source code I have specified two rows to be highlighted. This is possible because of the&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
mListBox-&amp;gt;setSelectionMode(CEGUI::MultiColumnList::SelectionMode::RowMultiple);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
statement from above. Review the API documentation about the ''setSelectionMode''. You can make it single row based or column based.&lt;br /&gt;
&lt;br /&gt;
Program this and give it a try. When you run your program don't forget to re-arrange the column order (drag and drop the column header), resize columns and double click a column header to sort the rows via the clicked column.&lt;br /&gt;
&lt;br /&gt;
== Other Notable Items ==&lt;br /&gt;
&lt;br /&gt;
'''At least one column is required.''' You '''must''' have defined at least one column using the ''addColumn()'' method or you will get an error when you attempt to insert a row using the ''addRow()'' funtion.&lt;br /&gt;
&lt;br /&gt;
'''Odd Column Sizes.''' After the window is created the columns may appear funny - that is, the columns and the data won't appear aligned. There appears to be an initial 'redraw' bug in the library. If you manually resize a column (yes, with the mouse like in windows) it will correct the column layout, spacing and alignment. Also remember that you should '''not''' follow each ''addColumn()'' with a ''setColumnHeaderWidth()''. Create all the columns first and then set the column widths. Not following this will yield unreliable column size results. See the example above.&lt;br /&gt;
&lt;br /&gt;
'''Drag and Drop.''' As of version 0.4.0 you can not use the CEGUI Drag and Drop feature with ''ListboxTextItem''. Drag and Drop only works with ''Window'' based widgets right now.&lt;/div&gt;</summary>
		<author><name>Van</name></author>	</entry>

	<entry>
		<id>http://cegui.org.uk/wiki/index.php?title=MultiColumnList&amp;diff=207</id>
		<title>MultiColumnList</title>
		<link rel="alternate" type="text/html" href="http://cegui.org.uk/wiki/index.php?title=MultiColumnList&amp;diff=207"/>
				<updated>2005-09-27T14:51:36Z</updated>
		
		<summary type="html">&lt;p&gt;Van: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Since I have been harping about documentation in the forums, I thought it best that I put my money where my mouth is. I am not an expert but I would like to share what I have learned and gleaned about the ''MultiColumnList'' widget.&lt;br /&gt;
&lt;br /&gt;
If you are familiar with the ''Listbox'' widget then the ''MultiColumnList'' will be a natural progression for you. The one thing you need to remember is that every column entry in the ''MultiColumnList'' will have its own instance of a ''ListboxItem'' or ''ListboxTextItem''. The ''MultiColumnList'' has some very nice features built directly into the widged. By default your users can: a) re-arrange the column display order; b) sort (Ascending and Descending) rows by a column; c) change the width of a column. These features can be disabled.&lt;br /&gt;
&lt;br /&gt;
API References:&lt;br /&gt;
[http://www.cegui.org.uk/api_reference/classCEGUI_1_1MultiColumnList.html MultiColumnList]&lt;br /&gt;
[http://www.cegui.org.uk/api_reference/classCEGUI_1_1ListboxItem.html ListboxItem]&lt;br /&gt;
[http://www.cegui.org.uk/api_reference/classCEGUI_1_1ListboxTextItem.html ListboxTextItem]&lt;br /&gt;
[http://www.cegui.org.uk/api_reference/classCEGUI_1_1WindowManager.html WindowManager]&lt;br /&gt;
&lt;br /&gt;
''Please note that the following example source code was gleaned and edited from project specific code so there may be some syntax errors.''&lt;br /&gt;
&lt;br /&gt;
Take a look at this code on how we create the ''MultiColumnList'' window:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
// Get the CEGUI Window Manager&lt;br /&gt;
CEGUI::WindowManager *mWinMgr = CEGUI::WindowManager::getSingletonPtr();&lt;br /&gt;
&lt;br /&gt;
// Create the CEGUI MultiColumnList window&lt;br /&gt;
CEGUI::MultiColumnList *mListBox = (CEGUI::MultiColumnList *)mWinMgr-&amp;gt;createWindow(&lt;br /&gt;
(CEGUI::utf8*)CEGUILOOK&amp;quot;/MultiColumnList&amp;quot;, (CEGUI::utf8*)&amp;quot;MyListBox&amp;quot;);&lt;br /&gt;
// Don't forget to add this window to another window and set its other properties&lt;br /&gt;
// like position, size, etc. Use the methods you prefer.&lt;br /&gt;
mListBox-&amp;gt;setPosition( CEGUI::Point(0.05f, 0.1f) );&lt;br /&gt;
mListBox-&amp;gt;setSize( CEGUI::Size(0.90f, 0.80f) );&lt;br /&gt;
// mSomeWindow-&amp;gt;addChild(mListBox);&lt;br /&gt;
&lt;br /&gt;
// Set the users selection ability&lt;br /&gt;
mListBox-&amp;gt;setSelectionMode(CEGUI::MultiColumnList::SelectionMode::RowMultiple);&lt;br /&gt;
&lt;br /&gt;
// Add some column headers&lt;br /&gt;
mListBox-&amp;gt;addColumn(&amp;quot;Column1&amp;quot;, 0, 0.10f);&lt;br /&gt;
mListBox-&amp;gt;addColumn(&amp;quot;Column2&amp;quot;, 1, 0.25f);&lt;br /&gt;
mListBox-&amp;gt;addColumn(&amp;quot;Column3&amp;quot;, 2, 0.25f);&lt;br /&gt;
mListBox-&amp;gt;addColumn(&amp;quot;Column4&amp;quot;, 3, 0.45f);&lt;br /&gt;
&lt;br /&gt;
// I don't know why, but you have set the column header widths via this function.&lt;br /&gt;
// The Column Header widths are not assumed from the &amp;quot;addColumn&amp;quot; function. Bug?&lt;br /&gt;
mListBox-&amp;gt;setColumnHeaderWidth(0, 0.10f);&lt;br /&gt;
mListBox-&amp;gt;setColumnHeaderWidth(1, 0.25f);&lt;br /&gt;
mListBox-&amp;gt;setColumnHeaderWidth(2, 0.25f);&lt;br /&gt;
mListBox-&amp;gt;setColumnHeaderWidth(3, 0.45f);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Note these lines in the code:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
// I don't know why, but you have set the column header widths via this function.&lt;br /&gt;
// The Column Header widths are not assumed from the &amp;quot;addColumn&amp;quot; function. Bug?&lt;br /&gt;
mListBox-&amp;gt;setColumnHeaderWidth(0, 0.10f);&lt;br /&gt;
mListBox-&amp;gt;setColumnHeaderWidth(1, 0.25f);&lt;br /&gt;
mListBox-&amp;gt;setColumnHeaderWidth(2, 0.25f);&lt;br /&gt;
mListBox-&amp;gt;setColumnHeaderWidth(3, 0.45f);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you don't set the column header widths with the ''setColumnHeaderWidth'' method then the columns will appear to be ''stacked'' on top of one another. This may be a bug in the library. The numbers I used for the widths are arbitrary. You can make them anything you like.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Now, lets create a method to add data to our ''MultiColumnList''. Review this code:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
void addListboxItem(char *c1, char *c2, char *c3, char *c4, bool isSelected)&lt;br /&gt;
{&lt;br /&gt;
  // First, we need to add a new row to the Listbox&lt;br /&gt;
  // mListBox is from the above code, its a class global pointer in my code.&lt;br /&gt;
  // If you want, you can singleton() the Listbox or pass the pointer to this function.&lt;br /&gt;
  unsigned int mRow = mListBox-&amp;gt;addRow();&lt;br /&gt;
&lt;br /&gt;
  // Remember, each column is a 'ListboxTextitem' so we need to&lt;br /&gt;
  // create a new instance for each column.&lt;br /&gt;
&lt;br /&gt;
  // Column1&lt;br /&gt;
  // Create our ListboxTextItem instance...&lt;br /&gt;
  CEGUI::ListboxTextItem* item = new CEGUI::ListboxTextItem((CEGUI::utf8*)c1, 0);&lt;br /&gt;
  // Note that in 'setItem' we specify '0' for the index/column we want this&lt;br /&gt;
  // ListboxTextItem to be attached too.&lt;br /&gt;
  mListBox-&amp;gt;setItem(item, 0, mRow);&lt;br /&gt;
  // Should it be selected? I know this appears weird but yes you can have columns be&lt;br /&gt;
  // selected or not selected. In other words, its not ROW based, its COLUMN based &lt;br /&gt;
  // selection. Why? more options and flexibilty!&lt;br /&gt;
  item-&amp;gt;setSelected(isSelected);&lt;br /&gt;
  // Don't forget to set the selection brush or your item won't get highlighted.&lt;br /&gt;
  item-&amp;gt;setSelectionBrushImage( (CEGUI::utf8*)&amp;quot;TaharezLook&amp;quot;, (CEGUI::utf8*)GEGUI_SelectionBrushImage);&lt;br /&gt;
  // You could attach some data to this column that is important to you by&lt;br /&gt;
  // using the 'setUserData' function. Each column could point to a different&lt;br /&gt;
  // user data source or the same user data source, or nothing at all.&lt;br /&gt;
  // item-&amp;gt;setUserData(MyPointerToSomeData);&lt;br /&gt;
&lt;br /&gt;
  // Column2&lt;br /&gt;
  item = new CEGUI::ListboxTextItem((CEGUI::utf8*)c2, 0);&lt;br /&gt;
  mListBox-&amp;gt;setItem(item, 1, mRow);&lt;br /&gt;
  item-&amp;gt;setSelected(isSelected);&lt;br /&gt;
  item-&amp;gt;setSelectionBrushImage( (CEGUI::utf8*)&amp;quot;TaharezLook&amp;quot;, (CEGUI::utf8*)GEGUI_SelectionBrushImage);&lt;br /&gt;
&lt;br /&gt;
  // Column3&lt;br /&gt;
  item = new CEGUI::ListboxTextItem((CEGUI::utf8*)c3, 0);&lt;br /&gt;
  mListBox-&amp;gt;setItem(item, 2, mRow);&lt;br /&gt;
  item-&amp;gt;setSelected(isSelected);&lt;br /&gt;
  item-&amp;gt;setSelectionBrushImage( (CEGUI::utf8*)&amp;quot;TaharezLook&amp;quot;, (CEGUI::utf8*)GEGUI_SelectionBrushImage);&lt;br /&gt;
&lt;br /&gt;
  //Column4&lt;br /&gt;
  item = new CEGUI::ListboxTextItem((CEGUI::utf8*)c4, 0);&lt;br /&gt;
  mListBox-&amp;gt;setItem(item, 3, mRow);&lt;br /&gt;
  item-&amp;gt;setSelected(isSelected);&lt;br /&gt;
  item-&amp;gt;setSelectionBrushImage( (CEGUI::utf8*)&amp;quot;TaharezLook&amp;quot;, (CEGUI::utf8*)GEGUI_SelectionBrushImage);&lt;br /&gt;
&lt;br /&gt;
} // addListboxItem&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Now, somewhere in your code, call the ''addListboxItem'' function like this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  ...&lt;br /&gt;
  addListboxItem(&amp;quot;Item1 Col1&amp;quot;, &amp;quot;Item1 Col2&amp;quot;, &amp;quot;Item1 Col3&amp;quot;, &amp;quot;Item1 Col4&amp;quot;, true);&lt;br /&gt;
  addListboxItem(&amp;quot;Item2 Col1&amp;quot;, &amp;quot;Item2 Col2&amp;quot;, &amp;quot;Item2 Col3&amp;quot;, &amp;quot;Item2 Col4&amp;quot;, false);&lt;br /&gt;
  addListboxItem(&amp;quot;Item3 Col1&amp;quot;, &amp;quot;Item3 Col2&amp;quot;, &amp;quot;Item3 Col3&amp;quot;, &amp;quot;Item3 Col4&amp;quot;, false);&lt;br /&gt;
  addListboxItem(&amp;quot;Item4 Col1&amp;quot;, &amp;quot;Item4 Col2&amp;quot;, &amp;quot;Item4 Col3&amp;quot;, &amp;quot;Item4 Col4&amp;quot;, true);&lt;br /&gt;
  ...&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You will note that in the above source code I have specified two rows to be highlighted. This is possible because of the&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
mListBox-&amp;gt;setSelectionMode(CEGUI::MultiColumnList::SelectionMode::RowMultiple);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
statement from above. Review the API documentation about the ''setSelectionMode''. You can make it single row based or column based.&lt;br /&gt;
&lt;br /&gt;
Program this and give it a try. When you run your program don't forget to re-arrange the column order (drag and drop the column header), resize columns and double click a column header to sort the rows via the clicked column.&lt;br /&gt;
&lt;br /&gt;
'''Other Notable Items'''&lt;br /&gt;
&lt;br /&gt;
After the window is created the columns may appear funny - that is, the columns and the data won't appear aligned. There appears to be an initial 'redraw' bug in the library. If you manually resize a column (yes, with the mouse like in windows) it will correct the column layout, spacing and alignment. &lt;br /&gt;
&lt;br /&gt;
Also note that as of version 0.4.0 you can not use the CEGUI Drag and Drop feature with ''ListboxTextItem'' (Drag and Drop only works on ''Window'' based widgets right now).&lt;br /&gt;
&lt;br /&gt;
You '''must''' have defined at least one column using the ''addColumn()'' method or you will get an error when you attempt to insert a row using the ''addRow()'' funtion.&lt;/div&gt;</summary>
		<author><name>Van</name></author>	</entry>

	<entry>
		<id>http://cegui.org.uk/wiki/index.php?title=MultiColumnList&amp;diff=206</id>
		<title>MultiColumnList</title>
		<link rel="alternate" type="text/html" href="http://cegui.org.uk/wiki/index.php?title=MultiColumnList&amp;diff=206"/>
				<updated>2005-09-27T14:50:53Z</updated>
		
		<summary type="html">&lt;p&gt;Van: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Since I have been harping about documentation in the forums, I thought it best that I put my money where my mouth is. I am not an expert but I would like to share what I have learned and gleaned about the ''MultiColumnList'' widget.&lt;br /&gt;
&lt;br /&gt;
If you are familiar with the ''Listbox'' widget then the ''MultiColumnList'' will be a natural progression for you. The one thing you need to remember is that every column entry in the ''MultiColumnList'' will have its own instance of a ''ListboxItem'' or ''ListboxTextItem''. The ''MultiColumnList'' has some very nice features built directly into the widged. By default your users can: a) re-arrange the column display order; b) sort (Ascending and Descending) rows by a column; c) change the width of a column. These features can be disabled.&lt;br /&gt;
&lt;br /&gt;
API References:&lt;br /&gt;
[http://www.cegui.org.uk/api_reference/classCEGUI_1_1MultiColumnList.html MultiColumnList]&lt;br /&gt;
[http://www.cegui.org.uk/api_reference/classCEGUI_1_1ListboxItem.html ListboxItem]&lt;br /&gt;
[http://www.cegui.org.uk/api_reference/classCEGUI_1_1ListboxTextItem.html ListboxTextItem]&lt;br /&gt;
[http://www.cegui.org.uk/api_reference/classCEGUI_1_1WindowManager.html WindowManager]&lt;br /&gt;
&lt;br /&gt;
''Please note that the following example source code was gleaned and edited from project specific code so there may be some syntax errors.''&lt;br /&gt;
&lt;br /&gt;
Take a look at this code on how we create the ''MultiColumnList'' window:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
// Get the CEGUI Window Manager&lt;br /&gt;
CEGUI::WindowManager *mWinMgr = CEGUI::WindowManager::getSingletonPtr();&lt;br /&gt;
&lt;br /&gt;
// Create the CEGUI MultiColumnList window&lt;br /&gt;
CEGUI::MultiColumnList *mListBox = (CEGUI::MultiColumnList *)mWinMgr-&amp;gt;createWindow(&lt;br /&gt;
(CEGUI::utf8*)CEGUILOOK&amp;quot;/MultiColumnList&amp;quot;, (CEGUI::utf8*)&amp;quot;MyListBox&amp;quot;);&lt;br /&gt;
// Don't forget to add this window to another window and set its other properties&lt;br /&gt;
// like position, size, etc. Use the methods you prefer.&lt;br /&gt;
mListBox-&amp;gt;setPosition( CEGUI::Point(0.05f, 0.1f) );&lt;br /&gt;
mListBox-&amp;gt;setSize( CEGUI::Size(0.90f, 0.80f) );&lt;br /&gt;
// mSomeWindow-&amp;gt;addChild(mListBox);&lt;br /&gt;
&lt;br /&gt;
// Set the users selection ability&lt;br /&gt;
mListBox-&amp;gt;setSelectionMode(CEGUI::MultiColumnList::SelectionMode::RowMultiple);&lt;br /&gt;
&lt;br /&gt;
// Add some column headers&lt;br /&gt;
mListBox-&amp;gt;addColumn(&amp;quot;Column1&amp;quot;, 0, 0.10f);&lt;br /&gt;
mListBox-&amp;gt;addColumn(&amp;quot;Column2&amp;quot;, 1, 0.25f);&lt;br /&gt;
mListBox-&amp;gt;addColumn(&amp;quot;Column3&amp;quot;, 2, 0.25f);&lt;br /&gt;
mListBox-&amp;gt;addColumn(&amp;quot;Column4&amp;quot;, 3, 0.45f);&lt;br /&gt;
&lt;br /&gt;
// I don't know why, but you have set the column header widths via this function.&lt;br /&gt;
// The Column Header widths are not assumed from the &amp;quot;addColumn&amp;quot; function. Bug?&lt;br /&gt;
mListBox-&amp;gt;setColumnHeaderWidth(0, 0.10f);&lt;br /&gt;
mListBox-&amp;gt;setColumnHeaderWidth(1, 0.25f);&lt;br /&gt;
mListBox-&amp;gt;setColumnHeaderWidth(2, 0.25f);&lt;br /&gt;
mListBox-&amp;gt;setColumnHeaderWidth(3, 0.45f);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Note these lines in the code:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
// I don't know why, but you have set the column header widths via this function.&lt;br /&gt;
// The Column Header widths are not assumed from the &amp;quot;addColumn&amp;quot; function. Bug?&lt;br /&gt;
mListBox-&amp;gt;setColumnHeaderWidth(0, 0.10f);&lt;br /&gt;
mListBox-&amp;gt;setColumnHeaderWidth(1, 0.25f);&lt;br /&gt;
mListBox-&amp;gt;setColumnHeaderWidth(2, 0.25f);&lt;br /&gt;
mListBox-&amp;gt;setColumnHeaderWidth(3, 0.45f);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you don't set the column header widths with the ''setColumnHeaderWidth'' method then the columns will appear to be ''stacked'' on top of one another. This may be a bug in the library. The numbers I used for the widths are arbitrary. You can make them anything you like.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Now, lets create a method to add data to our ''MultiColumnList''. Review this code:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
void addListboxItem(char *c1, char *c2, char *c3, char *c4, bool isSelected)&lt;br /&gt;
{&lt;br /&gt;
  // First, we need to add a new row to the Listbox&lt;br /&gt;
  // mListBox is from the above code, its a class global pointer in my code.&lt;br /&gt;
  // If you want, you can singleton() the Listbox or pass the pointer to this function.&lt;br /&gt;
  unsigned int mRow = mListBox-&amp;gt;addRow();&lt;br /&gt;
&lt;br /&gt;
  // Remember, each column is a 'ListboxTextitem' so we need to&lt;br /&gt;
  // create a new instance for each column.&lt;br /&gt;
&lt;br /&gt;
  // Column1&lt;br /&gt;
  // Create our ListboxTextItem instance...&lt;br /&gt;
  CEGUI::ListboxTextItem* item = new CEGUI::ListboxTextItem((CEGUI::utf8*)c1, 0);&lt;br /&gt;
  // Note that in 'setItem' we specify '0' for the index/column we want this&lt;br /&gt;
  // ListboxTextItem to be attached too.&lt;br /&gt;
  mListBox-&amp;gt;setItem(item, 0, mRow);&lt;br /&gt;
  // Should it be selected? I know this appears weird but yes you can have columns be&lt;br /&gt;
  // selected or not selected. In other words, its not ROW based, its COLUMN based &lt;br /&gt;
  // selection. Why? more options and flexibilty!&lt;br /&gt;
  item-&amp;gt;setSelected(isSelected);&lt;br /&gt;
  // Don't forget to set the selection brush or your item won't get highlighted.&lt;br /&gt;
  item-&amp;gt;setSelectionBrushImage( (CEGUI::utf8*)&amp;quot;TaharezLook&amp;quot;, (CEGUI::utf8*)GEGUI_SelectionBrushImage);&lt;br /&gt;
  // You could attach some data to this column that is important to you by&lt;br /&gt;
  // using the 'setUserData' function. Each column could point to a different&lt;br /&gt;
  // user data source or the same user data source, or nothing at all.&lt;br /&gt;
  // item-&amp;gt;setUserData(MyPointerToSomeData);&lt;br /&gt;
&lt;br /&gt;
  // Column2&lt;br /&gt;
  item = new CEGUI::ListboxTextItem((CEGUI::utf8*)c2, 0);&lt;br /&gt;
  mListBox-&amp;gt;setItem(item, 1, mRow);&lt;br /&gt;
  item-&amp;gt;setSelected(isSelected);&lt;br /&gt;
  item-&amp;gt;setSelectionBrushImage( (CEGUI::utf8*)&amp;quot;TaharezLook&amp;quot;, (CEGUI::utf8*)GEGUI_SelectionBrushImage);&lt;br /&gt;
&lt;br /&gt;
  // Column3&lt;br /&gt;
  item = new CEGUI::ListboxTextItem((CEGUI::utf8*)c3, 0);&lt;br /&gt;
  mListBox-&amp;gt;setItem(item, 2, mRow);&lt;br /&gt;
  item-&amp;gt;setSelected(isSelected);&lt;br /&gt;
  item-&amp;gt;setSelectionBrushImage( (CEGUI::utf8*)&amp;quot;TaharezLook&amp;quot;, (CEGUI::utf8*)GEGUI_SelectionBrushImage);&lt;br /&gt;
&lt;br /&gt;
  //Column4&lt;br /&gt;
  item = new CEGUI::ListboxTextItem((CEGUI::utf8*)c4, 0);&lt;br /&gt;
  mListBox-&amp;gt;setItem(item, 3, mRow);&lt;br /&gt;
  item-&amp;gt;setSelected(isSelected);&lt;br /&gt;
  item-&amp;gt;setSelectionBrushImage( (CEGUI::utf8*)&amp;quot;TaharezLook&amp;quot;, (CEGUI::utf8*)GEGUI_SelectionBrushImage);&lt;br /&gt;
&lt;br /&gt;
} // addListboxItem&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Now, somewhere in your code, call the ''addListboxItem'' function like this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  ...&lt;br /&gt;
  addListboxItem(&amp;quot;Item1 Col1&amp;quot;, &amp;quot;Item1 Col2&amp;quot;, &amp;quot;Item1 Col3&amp;quot;, &amp;quot;Item1 Col4&amp;quot;, true);&lt;br /&gt;
  addListboxItem(&amp;quot;Item2 Col1&amp;quot;, &amp;quot;Item2 Col2&amp;quot;, &amp;quot;Item2 Col3&amp;quot;, &amp;quot;Item2 Col4&amp;quot;, false);&lt;br /&gt;
  addListboxItem(&amp;quot;Item3 Col1&amp;quot;, &amp;quot;Item3 Col2&amp;quot;, &amp;quot;Item3 Col3&amp;quot;, &amp;quot;Item3 Col4&amp;quot;, false);&lt;br /&gt;
  addListboxItem(&amp;quot;Item4 Col1&amp;quot;, &amp;quot;Item4 Col2&amp;quot;, &amp;quot;Item4 Col3&amp;quot;, &amp;quot;Item4 Col4&amp;quot;, true);&lt;br /&gt;
  ...&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You will note that in the above source code I have specified two rows to be highlighted. This is possible because of the&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
mListBox-&amp;gt;setSelectionMode(CEGUI::MultiColumnList::SelectionMode::RowMultiple);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
statement from above. Review the API documentation about the ''setSelectionMode''. You can make it single row based or column based.&lt;br /&gt;
&lt;br /&gt;
Program this and give it a try. When you run your program don't forget to re-arrange the column order (drag and drop the column header), resize columns and double click a column header to sort the rows via the clicked column.&lt;br /&gt;
&lt;br /&gt;
'''Other Notable Items'''&lt;br /&gt;
&lt;br /&gt;
After the window is created the columns may appear funny - that is, the columns and the data won't appear aligned. There appears to be an initial 'redraw' bug in the library. If you manually resize a column (yes, with the mouse like in windows) it will correct the column layout, spacing and alignment. &lt;br /&gt;
&lt;br /&gt;
Also note that as of version 0.4.0 you can not use the CEGUI Drag and Drop feature with ''ListboxTextItem'' (Drag and Drop only works on ''Window'' based widgets right now).&lt;br /&gt;
&lt;br /&gt;
You '''must''' have at least defined one column using the ''addColumn()'' method or you will get an error when you attempt to insert a row using the ''addRow()'' funtion.&lt;/div&gt;</summary>
		<author><name>Van</name></author>	</entry>

	<entry>
		<id>http://cegui.org.uk/wiki/index.php?title=Main_Page&amp;diff=219</id>
		<title>Main Page</title>
		<link rel="alternate" type="text/html" href="http://cegui.org.uk/wiki/index.php?title=Main_Page&amp;diff=219"/>
				<updated>2005-09-27T11:09:23Z</updated>
		
		<summary type="html">&lt;p&gt;Van: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== What's New in the Wiki ==&lt;br /&gt;
&lt;br /&gt;
* CodeSnippets: [[MultiColumnList]]&lt;/div&gt;</summary>
		<author><name>Van</name></author>	</entry>

	<entry>
		<id>http://cegui.org.uk/wiki/index.php?title=MultiColumnList&amp;diff=205</id>
		<title>MultiColumnList</title>
		<link rel="alternate" type="text/html" href="http://cegui.org.uk/wiki/index.php?title=MultiColumnList&amp;diff=205"/>
				<updated>2005-09-27T11:03:21Z</updated>
		
		<summary type="html">&lt;p&gt;Van: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Since I have been harping about documentation in the forums, I thought it best that I put my money where my mouth is. I am not an expert but I would like to share what I have learned and gleaned about the ''MultiColumnList'' widget.&lt;br /&gt;
&lt;br /&gt;
If you are familiar with the ''Listbox'' widget then the ''MultiColumnList'' will be a natural progression for you. The one thing you need to remember is that every column entry in the ''MultiColumnList'' will have its own instance of a ''ListboxItem'' or ''ListboxTextItem''. The ''MultiColumnList'' has some very nice features built directly into the widged. By default your users can: a) re-arrange the column display order; b) sort (Ascending and Descending) rows by a column; c) change the width of a column. These features can be disabled.&lt;br /&gt;
&lt;br /&gt;
API References:&lt;br /&gt;
[http://www.cegui.org.uk/api_reference/classCEGUI_1_1MultiColumnList.html MultiColumnList]&lt;br /&gt;
[http://www.cegui.org.uk/api_reference/classCEGUI_1_1ListboxItem.html ListboxItem]&lt;br /&gt;
[http://www.cegui.org.uk/api_reference/classCEGUI_1_1ListboxTextItem.html ListboxTextItem]&lt;br /&gt;
[http://www.cegui.org.uk/api_reference/classCEGUI_1_1WindowManager.html WindowManager]&lt;br /&gt;
&lt;br /&gt;
''Please note that the following example source code was gleaned and edited from project specific code so there may be some syntax errors.''&lt;br /&gt;
&lt;br /&gt;
Take a look at this code on how we create the ''MultiColumnList'' window:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
// Get the CEGUI Window Manager&lt;br /&gt;
CEGUI::WindowManager *mWinMgr = CEGUI::WindowManager::getSingletonPtr();&lt;br /&gt;
&lt;br /&gt;
// Create the CEGUI MultiColumnList window&lt;br /&gt;
CEGUI::MultiColumnList *mListBox = (CEGUI::MultiColumnList *)mWinMgr-&amp;gt;createWindow(&lt;br /&gt;
(CEGUI::utf8*)CEGUILOOK&amp;quot;/MultiColumnList&amp;quot;, (CEGUI::utf8*)&amp;quot;MyListBox&amp;quot;);&lt;br /&gt;
// Don't forget to add this window to another window and set its other properties&lt;br /&gt;
// like position, size, etc. Use the methods you prefer.&lt;br /&gt;
mListBox-&amp;gt;setPosition( CEGUI::Point(0.05f, 0.1f) );&lt;br /&gt;
mListBox-&amp;gt;setSize( CEGUI::Size(0.90f, 0.80f) );&lt;br /&gt;
// mSomeWindow-&amp;gt;addChild(mListBox);&lt;br /&gt;
&lt;br /&gt;
// Set the users selection ability&lt;br /&gt;
mListBox-&amp;gt;setSelectionMode(CEGUI::MultiColumnList::SelectionMode::RowMultiple);&lt;br /&gt;
&lt;br /&gt;
// Add some column headers&lt;br /&gt;
mListBox-&amp;gt;addColumn(&amp;quot;Column1&amp;quot;, 0, 0.10f);&lt;br /&gt;
mListBox-&amp;gt;addColumn(&amp;quot;Column2&amp;quot;, 1, 0.25f);&lt;br /&gt;
mListBox-&amp;gt;addColumn(&amp;quot;Column3&amp;quot;, 2, 0.25f);&lt;br /&gt;
mListBox-&amp;gt;addColumn(&amp;quot;Column4&amp;quot;, 3, 0.45f);&lt;br /&gt;
&lt;br /&gt;
// I don't know why, but you have set the column header widths via this function.&lt;br /&gt;
// The Column Header widths are not assumed from the &amp;quot;addColumn&amp;quot; function. Bug?&lt;br /&gt;
mListBox-&amp;gt;setColumnHeaderWidth(0, 0.10f);&lt;br /&gt;
mListBox-&amp;gt;setColumnHeaderWidth(1, 0.25f);&lt;br /&gt;
mListBox-&amp;gt;setColumnHeaderWidth(2, 0.25f);&lt;br /&gt;
mListBox-&amp;gt;setColumnHeaderWidth(3, 0.45f);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Note these lines in the code:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
// I don't know why, but you have set the column header widths via this function.&lt;br /&gt;
// The Column Header widths are not assumed from the &amp;quot;addColumn&amp;quot; function. Bug?&lt;br /&gt;
mListBox-&amp;gt;setColumnHeaderWidth(0, 0.10f);&lt;br /&gt;
mListBox-&amp;gt;setColumnHeaderWidth(1, 0.25f);&lt;br /&gt;
mListBox-&amp;gt;setColumnHeaderWidth(2, 0.25f);&lt;br /&gt;
mListBox-&amp;gt;setColumnHeaderWidth(3, 0.45f);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you don't set the column header widths with the ''setColumnHeaderWidth'' method then the columns will appear to be ''stacked'' on top of one another. This may be a bug in the library. The numbers I used for the widths are arbitrary. You can make them anything you like.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Now, lets create a method to add data to our ''MultiColumnList''. Review this code:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
void addListboxItem(char *c1, char *c2, char *c3, char *c4, bool isSelected)&lt;br /&gt;
{&lt;br /&gt;
  // First, we need to add a new row to the Listbox&lt;br /&gt;
  // mListBox is from the above code, its a class global pointer in my code.&lt;br /&gt;
  // If you want, you can singleton() the Listbox or pass the pointer to this function.&lt;br /&gt;
  unsigned int mRow = mListBox-&amp;gt;addRow();&lt;br /&gt;
&lt;br /&gt;
  // Remember, each column is a 'ListboxTextitem' so we need to&lt;br /&gt;
  // create a new instance for each column.&lt;br /&gt;
&lt;br /&gt;
  // Column1&lt;br /&gt;
  // Create our ListboxTextItem instance...&lt;br /&gt;
  CEGUI::ListboxTextItem* item = new CEGUI::ListboxTextItem((CEGUI::utf8*)c1, 0);&lt;br /&gt;
  // Note that in 'setItem' we specify '0' for the index/column we want this&lt;br /&gt;
  // ListboxTextItem to be attached too.&lt;br /&gt;
  mListBox-&amp;gt;setItem(item, 0, mRow);&lt;br /&gt;
  // Should it be selected? I know this appears weird but yes you can have columns be&lt;br /&gt;
  // selected or not selected. In other words, its not ROW based, its COLUMN based &lt;br /&gt;
  // selection. Why? more options and flexibilty!&lt;br /&gt;
  item-&amp;gt;setSelected(isSelected);&lt;br /&gt;
  // Don't forget to set the selection brush or your item won't get highlighted.&lt;br /&gt;
  item-&amp;gt;setSelectionBrushImage( (CEGUI::utf8*)&amp;quot;TaharezLook&amp;quot;, (CEGUI::utf8*)GEGUI_SelectionBrushImage);&lt;br /&gt;
  // You could attach some data to this column that is important to you by&lt;br /&gt;
  // using the 'setUserData' function. Each column could point to a different&lt;br /&gt;
  // user data source or the same user data source, or nothing at all.&lt;br /&gt;
  // item-&amp;gt;setUserData(MyPointerToSomeData);&lt;br /&gt;
&lt;br /&gt;
  // Column2&lt;br /&gt;
  item = new CEGUI::ListboxTextItem((CEGUI::utf8*)c2, 0);&lt;br /&gt;
  mListBox-&amp;gt;setItem(item, 1, mRow);&lt;br /&gt;
  item-&amp;gt;setSelected(isSelected);&lt;br /&gt;
  item-&amp;gt;setSelectionBrushImage( (CEGUI::utf8*)&amp;quot;TaharezLook&amp;quot;, (CEGUI::utf8*)GEGUI_SelectionBrushImage);&lt;br /&gt;
&lt;br /&gt;
  // Column3&lt;br /&gt;
  item = new CEGUI::ListboxTextItem((CEGUI::utf8*)c3, 0);&lt;br /&gt;
  mListBox-&amp;gt;setItem(item, 2, mRow);&lt;br /&gt;
  item-&amp;gt;setSelected(isSelected);&lt;br /&gt;
  item-&amp;gt;setSelectionBrushImage( (CEGUI::utf8*)&amp;quot;TaharezLook&amp;quot;, (CEGUI::utf8*)GEGUI_SelectionBrushImage);&lt;br /&gt;
&lt;br /&gt;
  //Column4&lt;br /&gt;
  item = new CEGUI::ListboxTextItem((CEGUI::utf8*)c4, 0);&lt;br /&gt;
  mListBox-&amp;gt;setItem(item, 3, mRow);&lt;br /&gt;
  item-&amp;gt;setSelected(isSelected);&lt;br /&gt;
  item-&amp;gt;setSelectionBrushImage( (CEGUI::utf8*)&amp;quot;TaharezLook&amp;quot;, (CEGUI::utf8*)GEGUI_SelectionBrushImage);&lt;br /&gt;
&lt;br /&gt;
} // addListboxItem&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Now, somewhere in your code, call the ''addListboxItem'' function like this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  ...&lt;br /&gt;
  addListboxItem(&amp;quot;Item1 Col1&amp;quot;, &amp;quot;Item1 Col2&amp;quot;, &amp;quot;Item1 Col3&amp;quot;, &amp;quot;Item1 Col4&amp;quot;, true);&lt;br /&gt;
  addListboxItem(&amp;quot;Item2 Col1&amp;quot;, &amp;quot;Item2 Col2&amp;quot;, &amp;quot;Item2 Col3&amp;quot;, &amp;quot;Item2 Col4&amp;quot;, false);&lt;br /&gt;
  addListboxItem(&amp;quot;Item3 Col1&amp;quot;, &amp;quot;Item3 Col2&amp;quot;, &amp;quot;Item3 Col3&amp;quot;, &amp;quot;Item3 Col4&amp;quot;, false);&lt;br /&gt;
  addListboxItem(&amp;quot;Item4 Col1&amp;quot;, &amp;quot;Item4 Col2&amp;quot;, &amp;quot;Item4 Col3&amp;quot;, &amp;quot;Item4 Col4&amp;quot;, true);&lt;br /&gt;
  ...&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You will note that in the above source code I have specified two rows to be highlighted. This is possible because of the&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
mListBox-&amp;gt;setSelectionMode(CEGUI::MultiColumnList::SelectionMode::RowMultiple);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
statement from above. Review the API documentation about the ''setSelectionMode''. You can make it single row based or column based.&lt;br /&gt;
&lt;br /&gt;
Program this and give it a try. When you run your program don't forget to re-arrange the column order (drag and drop the column header), resize columns and double click a column header to sort the rows via the clicked column.&lt;br /&gt;
&lt;br /&gt;
'''Other Notable Items'''&lt;br /&gt;
&lt;br /&gt;
After the window is created the columns may appear funny - that is, the columns and the data won't appear aligned. There appears to be an initial 'redraw' bug in the library. If you manually resize a column (yes, with the mouse like in windows) it will correct the column layout, spacing and alignment. &lt;br /&gt;
&lt;br /&gt;
Also note that as of version 0.4.0 you can not use the CEGUI Drag and Drop feature with ''ListboxTextItem'' (Drag and Drop only works on ''Window'' based widgets right now).&lt;/div&gt;</summary>
		<author><name>Van</name></author>	</entry>

	<entry>
		<id>http://cegui.org.uk/wiki/index.php?title=MultiColumnList&amp;diff=203</id>
		<title>MultiColumnList</title>
		<link rel="alternate" type="text/html" href="http://cegui.org.uk/wiki/index.php?title=MultiColumnList&amp;diff=203"/>
				<updated>2005-09-27T10:59:57Z</updated>
		
		<summary type="html">&lt;p&gt;Van: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Since I have been harping about documentation in the forums, I thought it best that I put my money where my mouth is. I am not an expert but I would like to share what I have learned and gleaned about the ''MultiColumnList'' widget.&lt;br /&gt;
&lt;br /&gt;
If you are familiar with the ''Listbox'' widget then the ''MultiColumnList'' will be a natural progression for you. The one thing you need to remember is that every column entry in the ''MultiColumnList'' will have its own instance of a ''ListboxItem'' or ''ListboxTextItem''. The ''MultiColumnList'' has some very nice features built directly into the widged. By default your users can: a) re-arrange the column display order; b) sort (Ascending and Descending) rows by a column; c) change the width of a column. These features can be disabled.&lt;br /&gt;
&lt;br /&gt;
API References:&lt;br /&gt;
[http://www.cegui.org.uk/api_reference/classCEGUI_1_1MultiColumnList.html MultiColumnList]&lt;br /&gt;
[http://www.cegui.org.uk/api_reference/classCEGUI_1_1ListboxItem.html ListboxItem]&lt;br /&gt;
[http://www.cegui.org.uk/api_reference/classCEGUI_1_1ListboxTextItem.html ListboxTextItem]&lt;br /&gt;
[http://www.cegui.org.uk/api_reference/classCEGUI_1_1WindowManager.html WindowManager]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Take a look at this code:&lt;br /&gt;
''Please note that the following source code was gleaned and edited from project specific code so there may be some syntax errors.''&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
// Get the CEGUI Window Manager&lt;br /&gt;
CEGUI::WindowManager *mWinMgr = CEGUI::WindowManager::getSingletonPtr();&lt;br /&gt;
&lt;br /&gt;
// Create the CEGUI MultiColumnList window&lt;br /&gt;
CEGUI::MultiColumnList *mListBox = (CEGUI::MultiColumnList *)mWinMgr-&amp;gt;createWindow(&lt;br /&gt;
(CEGUI::utf8*)CEGUILOOK&amp;quot;/MultiColumnList&amp;quot;, (CEGUI::utf8*)&amp;quot;MyListBox&amp;quot;);&lt;br /&gt;
// Don't forget to add this window to another window and set its other properties&lt;br /&gt;
// like position, size, etc. Use the methods you prefer.&lt;br /&gt;
mListBox-&amp;gt;setPosition( CEGUI::Point(0.05f, 0.1f) );&lt;br /&gt;
mListBox-&amp;gt;setSize( CEGUI::Size(0.90f, 0.80f) );&lt;br /&gt;
// mSomeWindow-&amp;gt;addChild(mListBox);&lt;br /&gt;
&lt;br /&gt;
// Set the users selection ability&lt;br /&gt;
mListBox-&amp;gt;setSelectionMode(CEGUI::MultiColumnList::SelectionMode::RowMultiple);&lt;br /&gt;
&lt;br /&gt;
// Add some column headers&lt;br /&gt;
mListBox-&amp;gt;addColumn(&amp;quot;Column1&amp;quot;, 0, 0.10f);&lt;br /&gt;
mListBox-&amp;gt;addColumn(&amp;quot;Column2&amp;quot;, 1, 0.25f);&lt;br /&gt;
mListBox-&amp;gt;addColumn(&amp;quot;Column3&amp;quot;, 2, 0.25f);&lt;br /&gt;
mListBox-&amp;gt;addColumn(&amp;quot;Column4&amp;quot;, 3, 0.45f);&lt;br /&gt;
&lt;br /&gt;
// I don't know why, but you have set the column header widths via this function.&lt;br /&gt;
// The Column Header widths are not assumed from the &amp;quot;addColumn&amp;quot; function. Bug?&lt;br /&gt;
mListBox-&amp;gt;setColumnHeaderWidth(0, 0.10f);&lt;br /&gt;
mListBox-&amp;gt;setColumnHeaderWidth(1, 0.25f);&lt;br /&gt;
mListBox-&amp;gt;setColumnHeaderWidth(2, 0.25f);&lt;br /&gt;
mListBox-&amp;gt;setColumnHeaderWidth(3, 0.45f);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Note these lines in the code:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
// I don't know why, but you have set the column headerwidths via this function.&lt;br /&gt;
// The Column Header widths are not assumed from the &amp;quot;addColumn&amp;quot; function.&lt;br /&gt;
mListBox-&amp;gt;setColumnHeaderWidth(0, 0.10f);&lt;br /&gt;
mListBox-&amp;gt;setColumnHeaderWidth(1, 0.25f);&lt;br /&gt;
mListBox-&amp;gt;setColumnHeaderWidth(2, 0.10f);&lt;br /&gt;
mListBox-&amp;gt;setColumnHeaderWidth(3, 0.25f);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you don't set the column header widths with the ''setColumnHeaderWidth'' method then the columns will appear to be ''stacked'' on top of one another. This may be a bug in the library. The numbers I used for the widths are arbitrary. You can make them anything you like.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Now, lets create a method to add data to our ''MultiColumnList''. Review this code:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
void addListboxItem(char *c1, char *c2, char *c3, char *c4, bool isSelected)&lt;br /&gt;
{&lt;br /&gt;
  // First, we need to add a new row to the Listbox&lt;br /&gt;
  // mListBox is from the above code, its a class global pointer in my code.&lt;br /&gt;
  // If you want, you can singleton() the Listbox or pass the pointer to this function.&lt;br /&gt;
  unsigned int mRow = mListBox-&amp;gt;addRow();&lt;br /&gt;
&lt;br /&gt;
  // Remember, each column is a 'ListboxTextitem' so we need to&lt;br /&gt;
  // create a new instance for each column.&lt;br /&gt;
&lt;br /&gt;
  // Column1&lt;br /&gt;
  // Create our ListboxTextItem instance...&lt;br /&gt;
  CEGUI::ListboxTextItem* item = new CEGUI::ListboxTextItem((CEGUI::utf8*)c1, 0);&lt;br /&gt;
  // Note that in 'setItem' we specify '0' for the index/column we want this&lt;br /&gt;
  // ListboxTextItem to be attached too.&lt;br /&gt;
  mListBox-&amp;gt;setItem(item, 0, mRow);&lt;br /&gt;
  // Should it be selected? I know this appears weird but yes you can have columns be&lt;br /&gt;
  // selected or not selected. In other words, its not ROW based, its COLUMN based &lt;br /&gt;
  // selection. Why? more options and flexibilty!&lt;br /&gt;
  item-&amp;gt;setSelected(isSelected);&lt;br /&gt;
  // Don't forget to set the selection brush or your item won't get highlighted.&lt;br /&gt;
  item-&amp;gt;setSelectionBrushImage( (CEGUI::utf8*)&amp;quot;TaharezLook&amp;quot;, (CEGUI::utf8*)GEGUI_SelectionBrushImage);&lt;br /&gt;
  // You could attach some data to this column that is important to you by&lt;br /&gt;
  // using the 'setUserData' function. Each column could point to a different&lt;br /&gt;
  // user data source or the same user data source, or nothing at all.&lt;br /&gt;
  // item-&amp;gt;setUserData(MyPointerToSomeData);&lt;br /&gt;
&lt;br /&gt;
  // Column2&lt;br /&gt;
  item = new CEGUI::ListboxTextItem((CEGUI::utf8*)c2, 0);&lt;br /&gt;
  mListBox-&amp;gt;setItem(item, 1, mRow);&lt;br /&gt;
  item-&amp;gt;setSelected(isSelected);&lt;br /&gt;
  item-&amp;gt;setSelectionBrushImage( (CEGUI::utf8*)&amp;quot;TaharezLook&amp;quot;, (CEGUI::utf8*)GEGUI_SelectionBrushImage);&lt;br /&gt;
&lt;br /&gt;
  // Column3&lt;br /&gt;
  item = new CEGUI::ListboxTextItem((CEGUI::utf8*)c3, 0);&lt;br /&gt;
  mListBox-&amp;gt;setItem(item, 2, mRow);&lt;br /&gt;
  item-&amp;gt;setSelected(isSelected);&lt;br /&gt;
  item-&amp;gt;setSelectionBrushImage( (CEGUI::utf8*)&amp;quot;TaharezLook&amp;quot;, (CEGUI::utf8*)GEGUI_SelectionBrushImage);&lt;br /&gt;
&lt;br /&gt;
  //Column4&lt;br /&gt;
  item = new CEGUI::ListboxTextItem((CEGUI::utf8*)c4, 0);&lt;br /&gt;
  mListBox-&amp;gt;setItem(item, 3, mRow);&lt;br /&gt;
  item-&amp;gt;setSelected(isSelected);&lt;br /&gt;
  item-&amp;gt;setSelectionBrushImage( (CEGUI::utf8*)&amp;quot;TaharezLook&amp;quot;, (CEGUI::utf8*)GEGUI_SelectionBrushImage);&lt;br /&gt;
&lt;br /&gt;
} // addListboxItem&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Now, somewhere in your code, call the ''addListboxItem'' function like this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  ...&lt;br /&gt;
  addListboxItem(&amp;quot;Item1 Col1&amp;quot;, &amp;quot;Item1 Col2&amp;quot;, &amp;quot;Item1 Col3&amp;quot;, &amp;quot;Item1 Col4&amp;quot;, true);&lt;br /&gt;
  addListboxItem(&amp;quot;Item2 Col1&amp;quot;, &amp;quot;Item2 Col2&amp;quot;, &amp;quot;Item2 Col3&amp;quot;, &amp;quot;Item2 Col4&amp;quot;, false);&lt;br /&gt;
  addListboxItem(&amp;quot;Item3 Col1&amp;quot;, &amp;quot;Item3 Col2&amp;quot;, &amp;quot;Item3 Col3&amp;quot;, &amp;quot;Item3 Col4&amp;quot;, false);&lt;br /&gt;
  addListboxItem(&amp;quot;Item4 Col1&amp;quot;, &amp;quot;Item4 Col2&amp;quot;, &amp;quot;Item4 Col3&amp;quot;, &amp;quot;Item4 Col4&amp;quot;, true);&lt;br /&gt;
  ...&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You will note that in the above source code I have specified two rows to be highlighted. This is possible because of the&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
mListBox-&amp;gt;setSelectionMode(CEGUI::MultiColumnList::SelectionMode::RowMultiple);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
statement from above. Review the API documentation about the ''setSelectionMode''. You can make it single row based or column based.&lt;br /&gt;
&lt;br /&gt;
Program this and give it a try. When you run your program don't forget to re-arrange the column order (drag and drop the column header), resize columns and double click a column header to sort the rows via the clicked column.&lt;br /&gt;
&lt;br /&gt;
'''Other Notable Items'''&lt;br /&gt;
&lt;br /&gt;
After the window is created the columns may appear funny - that is, the columns and the data won't appear aligned. There appears to be an initial 'redraw' bug in the library. If you manually resize a column (yes, with the mouse like in windows) it will correct the column layout, spacing and alignment. &lt;br /&gt;
&lt;br /&gt;
Also note that as of version 0.4.0 you can not use the CEGUI Drag and Drop feature with ''ListboxTextItem'' (Drag and Drop only works on ''Window'' based widgets right now).&lt;/div&gt;</summary>
		<author><name>Van</name></author>	</entry>

	<entry>
		<id>http://cegui.org.uk/wiki/index.php?title=MultiColumnList&amp;diff=202</id>
		<title>MultiColumnList</title>
		<link rel="alternate" type="text/html" href="http://cegui.org.uk/wiki/index.php?title=MultiColumnList&amp;diff=202"/>
				<updated>2005-09-27T10:39:22Z</updated>
		
		<summary type="html">&lt;p&gt;Van: How to implement the MultiColumnList widget.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Since I have been harping about documentation in the forums, I thought it best that I put my money where my mouth is. I am not an expert but I would like to share what I have learned and gleaned about the ''MultiColumnList'' widget.&lt;br /&gt;
&lt;br /&gt;
If you are familiar with the ''Listbox'' widget then the ''MultiColumnList'' will be a natural progression for you. The one thing you need to remember is that every column entry in the ''MultiColumnList'' will have its own instance of a ''ListboxItem'' or ''ListboxTextItem''. The ''MultiColumnList'' has some very nice features built directly into the widged. By default your users can: a) re-arrange the column display order; b)sort (Ascending and Descending) rows by a column; c) change the width of a column. These features can be disabled.&lt;br /&gt;
&lt;br /&gt;
API References:&lt;br /&gt;
[http://www.cegui.org.uk/api_reference/classCEGUI_1_1MultiColumnList.html MultiColumnList]&lt;br /&gt;
[http://www.cegui.org.uk/api_reference/classCEGUI_1_1ListboxItem.html ListboxItem]&lt;br /&gt;
[http://www.cegui.org.uk/api_reference/classCEGUI_1_1ListboxTextItem.html ListboxTextItem]&lt;br /&gt;
[http://www.cegui.org.uk/api_reference/classCEGUI_1_1WindowManager.html WindowManager]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Take a look at this code:&lt;br /&gt;
''Please note that the following source code was gleaned and edited from project specific code so there may be some syntax errors.''&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
// Get the CEGUI Window Manager&lt;br /&gt;
CEGUI::WindowManager *mWinMgr = CEGUI::WindowManager::getSingletonPtr();&lt;br /&gt;
&lt;br /&gt;
// Create the CEGUI MultiColumnList window&lt;br /&gt;
CEGUI::MultiColumnList *mListBox = (CEGUI::MultiColumnList *)mWinMgr-&amp;gt;createWindow(&lt;br /&gt;
(CEGUI::utf8*)CEGUILOOK&amp;quot;/MultiColumnList&amp;quot;, (CEGUI::utf8*)&amp;quot;MyListBox&amp;quot;);&lt;br /&gt;
// Don't forget to add this window to another window and set its other properties&lt;br /&gt;
// like position, size, etc. Use the methods you prefer.&lt;br /&gt;
mListBox-&amp;gt;setPosition( CEGUI::Point(0.05f, 0.1f) );&lt;br /&gt;
mListBox-&amp;gt;setSize( CEGUI::Size(0.90f, 0.80f) );&lt;br /&gt;
// mSomeWindow-&amp;gt;addChild(mListBox);&lt;br /&gt;
&lt;br /&gt;
// Set the users selection ability&lt;br /&gt;
mListBox-&amp;gt;setSelectionMode(CEGUI::MultiColumnList::SelectionMode::RowMultiple);&lt;br /&gt;
&lt;br /&gt;
// Add some column headers&lt;br /&gt;
mListBox-&amp;gt;addColumn(&amp;quot;Column1&amp;quot;, 0, 0.10f);&lt;br /&gt;
mListBox-&amp;gt;addColumn(&amp;quot;Column2&amp;quot;, 1, 0.25f);&lt;br /&gt;
mListBox-&amp;gt;addColumn(&amp;quot;Column3&amp;quot;, 2, 0.25f);&lt;br /&gt;
mListBox-&amp;gt;addColumn(&amp;quot;Column4&amp;quot;, 3, 0.45f);&lt;br /&gt;
// I don't know why, but you have set the column header widths via this function.&lt;br /&gt;
// The Column Header widths are not assumed from the &amp;quot;addColumn&amp;quot; function. Bug?&lt;br /&gt;
mListBox-&amp;gt;setColumnHeaderWidth(0, 0.10f);&lt;br /&gt;
mListBox-&amp;gt;setColumnHeaderWidth(1, 0.25f);&lt;br /&gt;
mListBox-&amp;gt;setColumnHeaderWidth(2, 0.25f);&lt;br /&gt;
mListBox-&amp;gt;setColumnHeaderWidth(3, 0.45f);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Note these lines in the code:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
// I don't know why, but you have set the column headerwidths via this function.&lt;br /&gt;
// The Column Header widths are not assumed from the &amp;quot;addColumn&amp;quot; function.&lt;br /&gt;
mListBox-&amp;gt;setColumnHeaderWidth(0, 0.10f);&lt;br /&gt;
mListBox-&amp;gt;setColumnHeaderWidth(1, 0.25f);&lt;br /&gt;
mListBox-&amp;gt;setColumnHeaderWidth(2, 0.10f);&lt;br /&gt;
mListBox-&amp;gt;setColumnHeaderWidth(3, 0.25f);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you don't set the column header widths with the ''setColumnHeaderWidth'' method then the columns will appear to be ''stacked'' on top of one another. This may be a bug in the library. The numbers I used for the widths are arbitrary. You can make them anything you like.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Now, lets create a method to add data to our ''MultiColumnList''. Review this code:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
void addListboxItem(char *c1, char *c2, char *c3, char *c4, bool isSelected)&lt;br /&gt;
{&lt;br /&gt;
  // First, we need to add a new row to the Listbox&lt;br /&gt;
  unsigned int mRow = mListBox-&amp;gt;addRow();&lt;br /&gt;
&lt;br /&gt;
  // Remember, each column is a 'ListboxTextitem' so we need to&lt;br /&gt;
  // create a new instance for each column.&lt;br /&gt;
&lt;br /&gt;
  // Column1&lt;br /&gt;
  // Create our ListboxTextItem instance...&lt;br /&gt;
  CEGUI::ListboxTextItem* item = new CEGUI::ListboxTextItem((CEGUI::utf8*)c1, 0);&lt;br /&gt;
  // Note that in 'setItem' we specify '0' for the index/column we want this&lt;br /&gt;
  // ListboxTextItem to be attached too.&lt;br /&gt;
  mListBox-&amp;gt;setItem(item, 0, mRow);&lt;br /&gt;
  // Should it be selected? I know this appears weird but yes you can have columns be&lt;br /&gt;
  // selected or not selected. In other words, its not ROW based, its COLUMN based &lt;br /&gt;
  // selection. Why? more options and flexibilty!&lt;br /&gt;
  item-&amp;gt;setSelected(isSelected);&lt;br /&gt;
  // Don't forget to set the selection brush or your item won't get highlighted.&lt;br /&gt;
  item-&amp;gt;setSelectionBrushImage( (CEGUI::utf8*)&amp;quot;TaharezLook&amp;quot;, (CEGUI::utf8*)GEGUI_SelectionBrushImage);&lt;br /&gt;
  // You could attach some data to this column that is important to you by&lt;br /&gt;
  // using the 'setUserData' function. Each column could point to a different&lt;br /&gt;
  // user data source or the same user data source, or nothing at all.&lt;br /&gt;
  // item-&amp;gt;setUserData(MyPointerToSomeData);&lt;br /&gt;
&lt;br /&gt;
  // Column2&lt;br /&gt;
  item = new CEGUI::ListboxTextItem((CEGUI::utf8*)c2, 0);&lt;br /&gt;
  mListBox-&amp;gt;setItem(item, 1, mRow);&lt;br /&gt;
  item-&amp;gt;setSelected(isSelected);&lt;br /&gt;
  item-&amp;gt;setSelectionBrushImage( (CEGUI::utf8*)&amp;quot;TaharezLook&amp;quot;, (CEGUI::utf8*)GEGUI_SelectionBrushImage);&lt;br /&gt;
&lt;br /&gt;
  // Column3&lt;br /&gt;
  item = new CEGUI::ListboxTextItem((CEGUI::utf8*)c3, 0);&lt;br /&gt;
  mListBox-&amp;gt;setItem(item, 2, mRow);&lt;br /&gt;
  item-&amp;gt;setSelected(isSelected);&lt;br /&gt;
  item-&amp;gt;setSelectionBrushImage( (CEGUI::utf8*)&amp;quot;TaharezLook&amp;quot;, (CEGUI::utf8*)GEGUI_SelectionBrushImage);&lt;br /&gt;
&lt;br /&gt;
  //Column4&lt;br /&gt;
  item = new CEGUI::ListboxTextItem((CEGUI::utf8*)c4, 0);&lt;br /&gt;
  mListBox-&amp;gt;setItem(item, 3, mRow);&lt;br /&gt;
  item-&amp;gt;setSelected(isSelected);&lt;br /&gt;
  item-&amp;gt;setSelectionBrushImage( (CEGUI::utf8*)&amp;quot;TaharezLook&amp;quot;, (CEGUI::utf8*)GEGUI_SelectionBrushImage);&lt;br /&gt;
&lt;br /&gt;
} // addListboxItem&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Now, somewhere in your code, call the ''addListboxItem'' function like this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  ...&lt;br /&gt;
  addListboxItem(&amp;quot;Item1 Col1&amp;quot;, &amp;quot;Item1 Col2&amp;quot;, &amp;quot;Item1 Col3&amp;quot;, &amp;quot;Item1 Col4&amp;quot;, true);&lt;br /&gt;
  addListboxItem(&amp;quot;Item2 Col1&amp;quot;, &amp;quot;Item2 Col2&amp;quot;, &amp;quot;Item2 Col3&amp;quot;, &amp;quot;Item2 Col4&amp;quot;, false);&lt;br /&gt;
  addListboxItem(&amp;quot;Item3 Col1&amp;quot;, &amp;quot;Item3 Col2&amp;quot;, &amp;quot;Item3 Col3&amp;quot;, &amp;quot;Item3 Col4&amp;quot;, false);&lt;br /&gt;
  addListboxItem(&amp;quot;Item4 Col1&amp;quot;, &amp;quot;Item4 Col2&amp;quot;, &amp;quot;Item4 Col3&amp;quot;, &amp;quot;Item4 Col4&amp;quot;, true);&lt;br /&gt;
  ...&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You will note that in the above source code I have specified two rows to be highlighted. This is possible because of the&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
mListBox-&amp;gt;setSelectionMode(CEGUI::MultiColumnList::SelectionMode::RowMultiple);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
statement from above. Review the API documentation about the ''setSelectionMode''. You can make it single row based or column based.&lt;br /&gt;
&lt;br /&gt;
Another thing to note that after the window is created the columns may appear funny - that is, the columns and the data won't appear aligned. There appears to be an initial 'redraw' bug in the library. If you manually resize a column (yes, with the mouse like in windows) it will correct the column layout, spacing and alignment. Program this and give it a try. When you run your program don't forget to re-arrange the column order (drag and drop the column header), resize columns and double click a column header to sort the rows via the clicked column.&lt;/div&gt;</summary>
		<author><name>Van</name></author>	</entry>

	</feed>