m_minimumPaneSizeX = 0;
m_minimumPaneSizeY = 0;
- m_maximumPaneSizeX = 0;
- m_maximumPaneSizeY = 0;
+ m_maximumPaneSizeX = 10000;
+ m_maximumPaneSizeY = 10000;
}
wxSashWindow::wxSashWindow(wxWindow *parent, wxWindowID id, const wxPoint& pos,
m_extraBorderSize = 0;
m_minimumPaneSizeX = 0;
m_minimumPaneSizeY = 0;
- m_maximumPaneSizeX = 0;
- m_maximumPaneSizeY = 0;
+ m_maximumPaneSizeX = 10000;
+ m_maximumPaneSizeY = 10000;
m_sashCursorWE = new wxCursor(wxCURSOR_SIZEWE);
m_sashCursorNS = new wxCursor(wxCURSOR_SIZENS);
if (y > (yp + h))
status = wxSASH_STATUS_OUT_OF_RANGE;
int newHeight = (h - y);
+ newHeight=wxMax(newHeight,m_minimumPaneSizeY);
+ newHeight=wxMin(newHeight,m_maximumPaneSizeY);
dragRect = wxRect(xp, (yp + h) - newHeight, w, newHeight);
break;
}
if (y < 0)
status = wxSASH_STATUS_OUT_OF_RANGE;
int newHeight = y;
+ newHeight=wxMax(newHeight,m_minimumPaneSizeY);
+ newHeight=wxMin(newHeight,m_maximumPaneSizeY);
dragRect = wxRect(xp, yp, w, newHeight);
break;
}
if (x > (xp + w))
status = wxSASH_STATUS_OUT_OF_RANGE;
int newWidth = (w - x);
+ newWidth=wxMax(newWidth,m_minimumPaneSizeX);
+ newWidth=wxMin(newWidth,m_maximumPaneSizeX);
dragRect = wxRect((xp + w) - newWidth, yp, newWidth, h);
break;
}
if (x < 0)
status = wxSASH_STATUS_OUT_OF_RANGE;
int newWidth = x;
+ newWidth=wxMax(newWidth,m_minimumPaneSizeX);
+ newWidth=wxMin(newWidth,m_maximumPaneSizeX);
dragRect = wxRect(xp, yp, newWidth, h);
break;
}