+ // don't write text over the size grip:
+ // NOTE: overloading DoGetClientSize() and GetClientAreaOrigin() wouldn't
+ // work because the adjustment needs to be done only when drawing
+ // the field text and not also when drawing the background, the
+ // size grip itself, etc
+ if ((GetLayoutDirection() == wxLayout_RightToLeft && i == 0) ||
+ (GetLayoutDirection() != wxLayout_RightToLeft &&
+ i == (int)m_panes.GetCount()-1))
+ {
+ const wxRect& gripRc = GetSizeGripRect();
+
+ // NOTE: we don't need any special treatment wrt to the layout direction
+ // since DrawText() will automatically adjust the origin of the
+ // text accordingly to the layout in use
+
+ maxWidth -= gripRc.width;
+ }