// need to do many operation on it for ellipsization&markup support
SetLabel(label);
+ // as we didn't pass the correct label to MSWCreateControl(), it didn't set
+ // the initial size correctly -- do it now
+ InvalidateBestSize();
+ SetInitialSize(size);
+
// NOTE: if the label contains ampersand characters which are interpreted as
// accelerators, they will be rendered (at least on WinXP) only if the
// static text is placed inside a window class which correctly handles
}
#endif // SS_ENDELLIPSIS
- // this call will save the label in m_labelOrig and set it into this window
- // (through wxWindow::SetLabel)
+ // save the label in m_labelOrig with both the markup (if any) and
+ // the mnemonics characters (if any)
m_labelOrig = label;
#ifdef SS_ENDELLIPSIS
if ( styleReal & SS_ENDELLIPSIS )
- DoSetLabel(RemoveMarkup(label));
+ DoSetLabel(GetLabelWithoutMarkup());
else
#endif // SS_ENDELLIPSIS
DoSetLabel(GetEllipsizedLabelWithoutMarkup());