hi,
python-2.6.1, wxpython-2.8.12.1 (unicode)
i have a ListCtrl in a ResizeWidget and i save it's size, column widths,
sort column and sort order to disk between invocations of the application
so that it stays the way the user left it last.
when constructing the ListCtrl, i pass the saved window size as the default
size to its __init__. it behaves well on a mac but not so great on windows
where it seems to be treating the default size as a minimum size as well.
the user can't reduce the size of the ListCtrl to anything smaller than it
was when they started the application. they can only increase its size.
i considered using SetSizeHints() but the doco discourages its use for
windows that aren't top-level windows.
so, i added a call to SetMinSize((-1, -1)). it did no harm on the mac, but
on windows, it resulted in an initial size of (100, 80) rather than the
default size given in the constructor.
using SetMinSize((100, 100)) makes a tiny ListCtrl on both mac and windows.
so both are treating a real minimum size as though it were the default size.
so, i added SetSize((w, h)) where (w, h) was the default size that i had
passed when constructing the ListCtrl. that made no difference.
strangely, if i call GetSize(), it returns the default size as passed
to the ListCtrl constructor even though, visually, the ListCtrl's size
is the same as its much smaller minimum size.
it might have something to do with this in the containing panel:
def OnLayoutNeeded(event): self.Layout(); self.GetSizer().FitInside(self)
self.Bind(EVT_RW_LAYOUT_NEEDED, OnLayoutNeeded)
the doco for FitInside() (and Fit) both refer to using minimum sizes.
however, commenting that self.GetSizer().FitInside() doesn't seem to
have any effect. i wonder why i put it there in the first place :-?
can i set a default initial size while allowing the user to increase or
decrease the size of the ListCtrl/ResizeWidget on windows?
cheers,
raf