Page 1 of 1

MultiColumnList Bug

Posted: Fri Oct 15, 2004 00:11
by PeterNewman
Hi, I'm having trouble setting the selection mode of a MultiColumnList
In Demo7 you have:

Code: Select all

// work-around a small bug (oops!)
mclbox->setSelectionMode(MultiColumnList::RowMultiple);
mclbox->setSelectionMode(MultiColumnList::RowSingle);


I'm trying to create my window layout using XML. The window creates, but I can't select any of the items. I've tried putting in multiple

Code: Select all

<Property Name="SelectionMode" Value="RowSingle" />
<Property Name="SelectionMode" Value="RowMultiple" />
<Property Name="SelectionMode" Value="RowSingle" />

in the XML, but this doesn't help. I've also put multiple calls to setSelectionMode in my code, and that does nothing.

I don't see any event wiring in the demo code, so I assume it is supposed to be handled by the MultiListBox object.

For reference, I'm using CEGUI that I got from CVS at beta-1-root (or something similar). It was before you merged the changes back into HEAD. So my CEGUI is undoubtedly out-of-date, but I don't currently have time to update and fix everything, kinda actually got something due today that this is stopping.

I love deadlines. I love the sound they make as they go whooshing by. -- Douglas Adams (I think)

[edit]
OR they are selecting just fine, but because I'm using CEGUI::ListboxTextItem, the line

Code: Select all

setSelectionBrushImage((CEGUI::utf8*)"TaharezImagery", (CEGUI::utf8*)"MultiListSelectionBrush");
doesn't get called.. so I'm selecting, but can't see it.
Yup, that was it. setSelectionColour didn't work, though, but I don't think I've seen any of the Colour functions work (background colour etc).
[/edit]

MultiColumnList Bug

Posted: Fri Oct 15, 2004 07:27
by CrazyEddie
I'm not sure I understand what you mean when you say the 'setSelectionBrushImage' method does not get called; you're supposed to call that yourself when you initialise the ListboxTextItem, same as for the colour setting.

What colour setting functions do not work btw, as far as I know they all work.

Thanks for the patch on sf.net :) I'll do that today, and also fix a couple of other bugs in the MCL.

CE.

MultiColumnList Bug

Posted: Sun Oct 17, 2004 23:25
by PeterNewman
It doesn't get called because I didn't know I was supposed to call it. I just hadn't looked at the constructor of the ListBoxTextItem derived class you were using.

Off the top of my head, the one for the MCL didn't work. I can't find the function in my copy of the API docs right now, so I can't tell you the name. As I said, my CVS was from before you branched it, so I can't imagine what has been fixed since.

Your welcome on the patch. Just was one I came across so I thought I'd share.

MultiColumnList Bug

Posted: Mon Oct 18, 2004 07:33
by CrazyEddie
Yeah, I gotta get some additional documentation written. A lot of these more subtle things are not apparent from reading the API reference.

I'll look into the colour setting issue on the MCL (I don't think I fixed that specifically).