// this is a Windows limitation
wxASSERT_MSG( (nFields > 0) && (nFields < 255), "too many fields" );
- wxStatusBarBase::SetFieldsCount(nFields, widths);
-
- MSWUpdateFieldsWidths();
-
// keep in synch also our m_tooltips array
// reset all current tooltips
}
// shrink/expand the array:
- m_tooltips.resize(m_panes.GetCount(), NULL);
+ m_tooltips.resize(nFields, NULL);
+
+ wxStatusBarBase::SetFieldsCount(nFields, widths);
+
+ MSWUpdateFieldsWidths();
}
void wxStatusBar::SetStatusWidths(int n, const int widths[])
{
nCurPos += widthsAbs[i] + extraWidth;
pWidths[i] = nCurPos;
+
+ DoUpdateStatusText(i);
}
// The total width of the panes passed to Windows must be equal to the
}
delete [] pWidths;
-
-
- // FIXME: we may want to call DoUpdateStatusText() here since we may need to (de)ellipsize status texts
}
void wxStatusBar::DoUpdateStatusText(int nField)
/* static */
const wxStatusBar::MSWMetrics& wxStatusBar::MSWGetMetrics()
{
- static MSWMetrics s_metrics = { 0 };
+ static MSWMetrics s_metrics = { 0, 0 };
if ( !s_metrics.textMargin )
{
// Grip size should be self explanatory (the only problem with it is