git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@57627
c3d73ce0-8a6f-49c7-b76d-
6d57e0e08775
if ( !CreateControl(parent, id, pos, size, style, wxDefaultValidator, name) )
return false;
if ( !CreateControl(parent, id, pos, size, style, wxDefaultValidator, name) )
return false;
- if ( !MSWCreateControl(wxT("STATIC"), label, pos, size) )
+ if ( !MSWCreateControl(wxT("STATIC"), wxEmptyString, pos, size) )
+ // we set the label here and not through MSWCreateControl() because we
+ // need to do many operation on it for ellipsization&markup support
+ SetLabel(label);
+
+ // 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
+ // focusing by TAB traversal (e.g. wxPanel).
+