Has anyone tried to use a TableListBox with large number of columns? I tried, and it gets very very slow and the problem is the code at:
Basically we are going through all the columns even though most of them are not going to be visible in the viewport. We should really be figuring out what columns are actually visible and only iterating through them. I have hacked the code to change the for loop to refer to the viewport instead:
for (int x = owner.getViewport()->getViewPositionX(), columnId = owner.getHeader().getColumnIdAtX(x), i = owner.getHeader().getIndexOfColumnId(columnId, false); x < owner.getViewport()->getViewPositionX() + owner.getViewport()->getViewWidth() + owner.getHeader().getColumnWidth(columnId); x += owner.getHeader().getColumnWidth(columnId), columnId++, i++)
This seems to work, but I am not sure if this is the best solution to just go through the visible columns in the RowComp. Any ideas on a better way to do this? Of course, I was really just looking for a multicolumn ListBox to show 1000s of sample files in a horizontally scrolling grid...maybe I should try to just hack ListBox directly.