custom items in a multicolumnlist

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

Moderators: CEGUI MVP, CEGUI Team

Just popping in
Just popping in
Posts: 13
Joined: Thu Jun 29, 2006 08:22
Location: France

custom items in a multicolumnlist

Postby khayyam » Tue Mar 27, 2007 07:30

Hello all,

I would like to use custom items in a multicolumnlist. For example, I would like the items to be [a statictext, a combobox, a spinner, a statictext]. Is it possible or can we only use statictexts ?


User avatar
Quite a regular
Quite a regular
Posts: 83
Joined: Mon May 22, 2006 18:25
Location: Bergen op zoom, The Netherlands

Postby Levia » Tue Mar 27, 2007 09:53

At the moment, its only possible to add ListboxItems to the MultiColumnList, so basically, it is not possible to do that at the moment, without changing the source.

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

Postby Rackle » Tue Mar 27, 2007 14:33

Look at my code within this other thread about using a CEGUI::Window within a Listbox (or put another way, attempting to put absolutely anything within a Listbox). I got it to work but wasn't happy with how the selected list item looked; the highlight wasn't good enough for my taste.

I had also attempted to use that ListboxItemWindow class (which is derived from CEGUI::ListboxItem) within a multi-column listbox but did not have perfect success; the listbox item window was too large and clipped to the right (I had placed it in the last (third) column). I did not spend time trying to fix it.

Right now my train of thought is to either use a ScrollPane widget or to simulate a listbox or a multi-column listbox.

What I mean by simulating is to use a window with a border as the container, add a scrollbar to the right, and put in as many list items as I need; for example, if I'm to display 4 items in that simulated listbox I would then physically put 4 items within the layout. Then I would listen to scrollbar events and display the proper items within those 4 "slots". For example if I had 6 items to display I would display items 1-2-3-4, 2-3-4-5, or 3-4-5-6.

My layout would look something like this:

Code: Select all

  <window type="DefaultWindow" with a border visible>

    <window type="Scrollbar" placed to the right>

    <window type="Parent container for my first list item>
      <window type="First widget within the first list item>

    <window type="Parent container for my second list item>
      <window type="First widget within the second list item>


I would not prevent dragging the scrollbar thumb such that parts of the list items are displayed; they will never move and will always be fully displayed.

I'm not sure how I would handle a Combobox or a multi-column list though. Not yet...

Return to “Help”

Who is online

Users browsing this forum: No registered users and 2 guests