-
- wxSize newSize = size;
-
- PreCreation( parent, id, pos, size, style, name );
-
+
+ if (!PreCreation( parent, pos, size ) ||
+ !CreateBase( parent, id, pos, size, style, wxDefaultValidator, name ))
+ {
+ wxFAIL_MSG( wxT("wxXX creation failed") );
+ return FALSE;
+ }
+
+ // notice that we call the base class version which will just remove the
+ // '&' characters from the string, but not set the label's text to it
+ // because the label is not yet created and because SetLabel() has a side
+ // effect of changing the control size which might not be desirable