]> git.saurik.com Git - wxWidgets.git/blobdiff - src/mac/carbon/choice.cpp
pen.h depends from brush.h in compat mode
[wxWidgets.git] / src / mac / carbon / choice.cpp
index e5f7c54da458b413af1a69151b92493b12ec3c37..c395a39d19fdbc1a0789df384035195a4d00d510 100644 (file)
@@ -50,14 +50,17 @@ bool wxChoice::Create(wxWindow *parent,
     const wxValidator& validator,
     const wxString& name )
 {
     const wxValidator& validator,
     const wxString& name )
 {
-    return Create(
-        parent, id, pos, size, 0, NULL,
-        style, validator, name );
+    if ( !Create( parent, id, pos, size, 0, NULL, style, validator, name ) )
+        return false;
 
     Append( choices );
 
     if ( !choices.empty() )
         SetSelection( 0 );
 
     Append( choices );
 
     if ( !choices.empty() )
         SetSelection( 0 );
+
+    SetInitialSize( size );
+
+    return true;
 }
 
 bool wxChoice::Create(wxWindow *parent,
 }
 
 bool wxChoice::Create(wxWindow *parent,
@@ -136,7 +139,7 @@ int wxChoice::DoInsertItems(const wxArrayStringsAdapter & items,
 
         UMAInsertMenuItem(MAC_WXHMENU( m_macPopUpMenuHandle ),
                           items[i],
 
         UMAInsertMenuItem(MAC_WXHMENU( m_macPopUpMenuHandle ),
                           items[i],
-                          m_font.GetEncoding(),
+                          GetFont().GetEncoding(),
                           idx);
         m_datas.Insert( NULL, idx );
         AssignNewItemClientData(idx, clientData, i, type);
                           idx);
         m_datas.Insert( NULL, idx );
         AssignNewItemClientData(idx, clientData, i, type);