Tiny, tiny issue. I have a TableListBox which I’m dynamically sizing so it fills the remaining space to the right, and so that the last column on the right also fills its space.
This works very well, except if the TableListBox gets more elements than it can fit, in which case a up/down scroll appears… great, except that this makes my total width greater than the size of the table, so that I get an unneeded left/right scroll bar!
I have a simple hack, which is to always allow an extra 20 pixels for a possible up/down scroll bar when computing the width of the last column. This works fine, and really isn’t a big deal, but it’d be nice to actually get it right - either be able to detect the width of the ListBox without the up/down scroll bar, or be able to detect the existence of the up/down scroll bar at least.
As I said, tiny issue, but I’m a stickler for details…
Hmm, ideally Viewport would have a listener interface so we could know when things change. After a quick bit of digging though it looks like the viewport used by ListBoxes ias actually a custom one which calls ListBoxModel::listWasScrolled when the visible area changes: