+ const wxString& value,
+ const wxPoint& pos,
+ const wxSize& size,
+ int n, const wxString choices[],
+ long style,
+ const wxValidator& validator,
+ const wxString& name)
+{
+ if( !CreateControl( parent, id, pos, size, style, validator, name ) )
+ return false;
+ PreCreation();
+
+ Widget parentWidget = (Widget) parent->GetClientWidget();
+
+ Widget buttonWidget = XtVaCreateManagedWidget(name.c_str(),
+ xmComboBoxWidgetClass, parentWidget,
+ XmNmarginHeight, 0,
+ XmNmarginWidth, 0,
+ XmNshowLabel, False,
+ XmNeditable, ((style & wxCB_READONLY) != wxCB_READONLY),
+ XmNsorted, ((style & wxCB_SORT) == wxCB_SORT),
+ XmNstaticList, ((style & wxCB_SIMPLE) == wxCB_SIMPLE),
+ NULL);
+
+ int i;
+ for (i = 0; i < n; i++)
+ {
+ wxXmString str( choices[i] );
+ XmComboBoxAddItem(buttonWidget, str(), 0);
+ m_stringArray.Add(choices[i]);
+ }
+
+ m_mainWidget = (Widget) buttonWidget;
+
+ XtManageChild (buttonWidget);
+
+ SetValue(value);
+
+ XtAddCallback (buttonWidget, XmNselectionCallback, (XtCallbackProc) wxComboBoxCallback,
+ (XtPointer) this);
+ XtAddCallback (buttonWidget, XmNvalueChangedCallback, (XtCallbackProc) wxComboBoxCallback,
+ (XtPointer) this);
+
+ PostCreation();
+ AttachWidget (parent, m_mainWidget, (WXWidget) NULL, pos.x, pos.y, size.x, size.y);
+
+ return true;
+}
+
+bool wxComboBox::Create(wxWindow *parent, wxWindowID id,
+ const wxString& value,
+ const wxPoint& pos,
+ const wxSize& size,
+ const wxArrayString& choices,
+ long style,
+ const wxValidator& validator,
+ const wxString& name)
+{
+ wxCArrayString chs(choices);
+ return Create(parent, id, value, pos, size, chs.GetCount(),
+ chs.GetStrings(), style, validator, name);
+}