- if ( !CreateControl(parent, id, pos, size, style, validator, name) )
- return FALSE;
-// TODO:
-/*
- long msStyle = WS_CHILD | CBS_DROPDOWNLIST | WS_TABSTOP | WS_VISIBLE | WS_HSCROLL | WS_VSCROLL;
- if ( style & wxCB_SORT )
- msStyle |= CBS_SORT;
-
- // the experience shows that wxChoice vs. wxComboBox distinction confuses
- // quite a few people - try to help them
- wxASSERT_MSG( !(style & wxCB_DROPDOWN) &&
- !(style & wxCB_READONLY) &&
- !(style & wxCB_SIMPLE),
+ wxCArrayString chs(asChoices);
+
+ return Create(pParent, vId, rPos, rSize, chs.GetCount(), chs.GetStrings(),
+ lStyle, rValidator, rsName);
+}
+
+bool wxChoice::Create(
+ wxWindow* pParent
+, wxWindowID vId
+, const wxPoint& rPos
+, const wxSize& rSize
+, int n
+, const wxString asChoices[]
+, long lStyle
+, const wxValidator& rValidator
+, const wxString& rsName
+)
+{
+ long lSstyle;
+
+ if (!CreateControl( pParent
+ ,vId
+ ,rPos
+ ,rSize
+ ,lStyle
+ ,rValidator
+ ,rsName
+ ))
+ return false;
+ lSstyle = CBS_DROPDOWNLIST |
+ WS_TABSTOP |
+ WS_VISIBLE;
+
+ if (lStyle & wxCLIP_SIBLINGS )
+ lSstyle |= WS_CLIPSIBLINGS;
+
+ wxASSERT_MSG( !(lStyle & wxCB_DROPDOWN) &&
+ !(lStyle & wxCB_READONLY) &&
+ !(lStyle & wxCB_SIMPLE),