- m_insideBox = TRUE;
- CreateChildrenPrivately( NULL, GetParamNode(wxT("content")));
- wxString *strings = (wxString *) NULL;
- if( strList.GetCount() > 0 )
- {
- strings = new wxString[strList.GetCount()];
- int count = strList.GetCount();
- for( int i = 0; i < count; i++ )
- strings[i]=strList[i];
- }
-
-
- wxComboBox *control = new wxComboBox(m_parentAsWindow,
- GetID(),
- GetText(wxT("value")),
- GetPosition(), GetSize(),
- strList.GetCount(),
- strings,
- GetStyle(),
- wxDefaultValidator,
- GetName()
- );
-
- if( selection != -1 )
- control->SetSelection( selection );
+ m_insideBox = true;
+ CreateChildrenPrivately(NULL, GetParamNode(wxT("content")));
+
+ XRC_MAKE_INSTANCE(control, wxComboBox)
+
+ control->Create(m_parentAsWindow,
+ GetID(),
+ GetText(wxT("value")),
+ GetPosition(), GetSize(),
+ strList,
+ GetStyle(),
+ wxDefaultValidator,
+ GetName());
+
+ if (selection != -1)
+ control->SetSelection(selection);