Hi Jules,
I have a TableListBox derived class that I use like an horizontal ListBox, so that it always has a single row and a continuosly variable number of columns. I would like to receive TableListBoxModel::backgroundClicked() notifications, so I would suggest to change the TableListRowComp::mouseUp() method from:
[code] void mouseUp (const MouseEvent& e)
{
if (selectRowOnMouseUp && e.mouseWasClicked() && isEnabled())
{
owner.selectRowsBasedOnModifierKeys (row, e.mods);
const int columnId = owner.getHeader()->getColumnIdAtX (e.x);
if (columnId != 0 && owner.getModel() != 0)
owner.getModel()->cellClicked (row, columnId, e);
}
}[/code]
to:
[code] void mouseUp (const MouseEvent& e)
{
if (selectRowOnMouseUp && e.mouseWasClicked() && isEnabled())
{
owner.selectRowsBasedOnModifierKeys (row, e.mods);
const int columnId = owner.getHeader()->getColumnIdAtX (e.x);
if (owner.getModel() != 0)
{
if (columnId != 0)
owner.getModel()->cellClicked (row, columnId, e);
else
owner.getModel()->backgroundClicked();
}
}
}[/code]
What do you think?
