I am trying to create a custom control using the wx.combo.ComboPopup; in this case, what I would like to pop up (really, drop down) is a scrolledPanel that holds a column of a variable number of text controls. [wxPython 2.8.10 or 2.9.x, Python 2.5 or 2.7, Windows XP].
If there are only a smallish number of text controls, I would like the height of the popup to be exactly enough to hold all of them—no taller or shorter.
If there are many text controls, I would like the popup's height to clip at a maximum height, like ~500px. And then, in order to see the remainder of the text controls, there will appear scroll bars to allow scrolling down the column.
I *almost* have this, but there is an annoying visual glitch:
If I use the scrolledPanel and call SetupScrolling() once all text controls are added, it works other than this: there is a small bit of extra space at the end of the column of text controls.
In order to see this, please run the attached "Small Runnable
Sample App". Pop open the combo and scroll down
to the very bottom. See that red bit?
The question is: why
is the scrolledpanel (in red) showing through and how can I have that not
happen?
(I have fooled around with how I set the pref_height of the popup but no matter what I try, so far I am never getting it to not show at least some red).
Many thanks,
Che