Is this possible?
MyListBox: A ‘Normal’ ListBox.
MyListBox::refreshComponentForRow() creates when required a MyCustomListBox.
Has a header.
Has a couple of rows.
MyCustomListBox header always shows up in
It seems the height of MyCustomListBox is constrained by what MyListBox thinks the height of an item (row) should be (something like 22px). Am I correct about this? Empirical evidence:
- When I create a MyCustomListBox() I set the size to (100,400).
- MyCustomListBox gets a resize() where the bounds are in fact 100,400
- MyCustomListBox() then immediately gets another resize() where the bounds are (98,22). I Am assuming that this resize() is coming from MyListBox().
So since it is believed that the height of MyCustomListBox is only 22px it is not possible paint the contents of the list box (the rows). I.e. the Models ::paintListBoxItem is never called because no ‘rows’ are visible.
Are my assumptions correct or is it possible to use a ListBox as a CustomComponent within a ListBox? If the latter is true any hints on what I could be missing would be greatly appreciated.