]> git.saurik.com Git - wxWidgets.git/blobdiff - src/msw/stattext.cpp
check that the conversion to wxDateTime was really successful
[wxWidgets.git] / src / msw / stattext.cpp
index c16b89c12ba2ecb6790292b6f5ed73a68cfe64ae..7a20a94ae081c43564991063863a249d8a9c62bb 100644 (file)
@@ -94,9 +94,18 @@ bool wxStaticText::Create(wxWindow *parent,
     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) )
         return false;
 
+    // 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).
+
     return true;
 }