]> git.saurik.com Git - wxWidgets.git/blobdiff - src/gtk/radiobox.cpp
wxGPE updates to HEAD.
[wxWidgets.git] / src / gtk / radiobox.cpp
index 855f838e87afe52993699c1a109bfbe3301aa2ce..7463243d03c322c1c8c093391f54cabafd4dde66 100644 (file)
@@ -7,11 +7,12 @@
 // Licence:     wxWindows licence
 /////////////////////////////////////////////////////////////////////////////
 
-#ifdef __GNUG__
+#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA)
 #pragma implementation "radiobox.h"
 #endif
 
-#include "wx/defs.h"
+// For compilers that support precompilation, includes "wx.h".
+#include "wx/wxprec.h"
 
 #if wxUSE_RADIOBOX
 
@@ -167,6 +168,19 @@ void wxRadioBox::Init()
     m_lostFocus = FALSE;
 }
 
+bool wxRadioBox::Create( wxWindow *parent, wxWindowID id,
+                         const wxString& title,
+                         const wxPoint &pos, const wxSize &size,
+                         const wxArrayString& choices, int majorDim,
+                         long style, const wxValidator& validator,
+                         const wxString &name )
+{
+    wxCArrayString chs(choices);
+
+    return Create( parent, id, title, pos, size, chs.GetCount(),
+                   chs.GetStrings(), majorDim, style, validator, name );
+}
+
 bool wxRadioBox::Create( wxWindow *parent, wxWindowID id, const wxString& title,
                          const wxPoint &pos, const wxSize &size,
                          int n, const wxString choices[], int majorDim,
@@ -230,6 +244,7 @@ bool wxRadioBox::Create( wxWindow *parent, wxWindowID id, const wxString& title,
     m_parent->DoAddChild( this );
 
     PostCreation();
+    InheritAttributes();
 
     ApplyWidgetStyle();
 
@@ -250,9 +265,6 @@ bool wxRadioBox::Create( wxWindow *parent, wxWindowID id, const wxString& title,
     if (newSize.y == -1) newSize.y = ls.y;
     SetSize( newSize.x, newSize.y );
 
-    SetBackgroundColour( parent->GetBackgroundColour() );
-    SetForegroundColour( parent->GetForegroundColour() );
-
     Show( TRUE );
 
     return TRUE;