Page 1 of 1

MultiColumnList row selection not highlighting

Posted: Wed Apr 20, 2005 21:18
by TheBren
I have a MultiColumnList.

Part of its initialization includes this:

Code: Select all

list->setSelectionMode(CEGUI::MultiColumnList::RowSingle);


When I add rows, my ListBoxTextItem includes this:

Code: Select all

item->setSelectionBrushImage("TaharezLook", "ListboxSelectionBrush");


The row is highlighted if I select it in code like this:

Code: Select all

list->setItemSelectState(item, true);


However, if I select it with the mouse, the row is not highlighted. I get an EventSelectionChanged, and I can get the item with getFirstSelectedItem(), so everything seems to be working. The row just doesn't get visually highlighted.

Any suggestions?

Re: MultiColumnList row selection not highlighting

Posted: Wed Apr 20, 2005 22:37
by JNighthawk
Mind posting your code dealing with Listboxes and items? I can't figure out how to do them.

Re: MultiColumnList row selection not highlighting

Posted: Thu Apr 21, 2005 05:33
by gcarlton
Thats wierd, it works for me fine. If you want to debug it yourself, the place to put a breakpoint is:

Code: Select all

void ListboxTextItem::draw(const Vector3& position, float alpha, const Rect& clipper) const
{
  if (d_selected && (d_selectBrush != NULL))
  {
    d_selectBrush->draw(clipper, position.d_z, clipper, getModulateAlphaColourRect(d_selectCols, alpha));
  }
  ...


You should make sure d_selected is true, d_selectBrush is valid, and the alpha is reasonable. That might give you a heads-up whats going on, whether its a multi-listbox bug, or a rendering issue. Good luck!

Geoff