Propagate InformFirstDirection() to wxCollapsiblePane pane

As wxCollapsiblePane doesn't use sizers for layout (and while this could
be changed for the generic version, it still wouldn't fix the problem
for the native one), default InformFirstDirection() implementation
forwarding it to the window sizer doesn't work for it and we need to
explicitly let the contents of wxCollapsiblePane know about the
available size.
This commit is contained in:
Vadim Zeitlin
2018-10-21 16:45:24 +02:00
parent e397d5d825
commit c6cc416977

View File

@@ -43,6 +43,23 @@ public:
virtual wxString GetLabel() const wxOVERRIDE = 0;
virtual void SetLabel(const wxString& label) wxOVERRIDE = 0;
virtual bool
InformFirstDirection(int direction,
int size,
int availableOtherDir) wxOVERRIDE
{
wxWindow* const p = GetPane();
if ( !p )
return false;
if ( !p->InformFirstDirection(direction, size, availableOtherDir) )
return false;
InvalidateBestSize();
return true;
}
};