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:
@@ -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;
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user