+ wxRect rc;
+ GetFieldRect(nField, rc);
+
+ int margin;
+ if (nField == GetFieldsCount()-1)
+ margin = -6; // windows reports a smaller rect for the last field; enlarge it
+ else
+ margin = 4;
+
+ // do we need to ellipsize this string?
+ wxString ellipsizedStr =
+ wxControl::Ellipsize(GetStatusText(nField), *m_pDC,
+ GetLayoutDirection() == wxLayout_RightToLeft ? wxELLIPSIZE_START : wxELLIPSIZE_END,
+ rc.GetWidth() - margin, // leave a small margin
+ wxELLIPSIZE_EXPAND_TAB);
+