\func{}{wxGridCellChoiceEditor}{\param{size\_t }{count = 0}, \param{const wxString }{choices[] = NULL}, \param{bool }{allowOthers = false}}
+\func{}{wxGridCellChoiceEditor}{\param{const wxArrayString& }{choices}, \param{bool }{allowOthers = false}}
+
\docparam{count}{Number of strings from which the user can choose.}
\docparam{choices}{An array of strings from which the user can choose.}
\docparam{allowOthers}{If allowOthers if true, the user can type a string not in choices array.}
wxGridCellChoiceEditor(size_t count = 0,
const wxString choices[] = NULL,
bool allowOthers = FALSE);
+ wxGridCellChoiceEditor(const wxArrayString& choices,
+ bool allowOthers = FALSE);
virtual void Create(wxWindow* parent,
wxWindowID id,
// wxGridCellChoiceEditor
// ----------------------------------------------------------------------------
+wxGridCellChoiceEditor::wxGridCellChoiceEditor(const wxArrayString& choices,
+ bool allowOthers)
+ : m_choices(choices),
+ m_allowOthers(allowOthers) { }
+
wxGridCellChoiceEditor::wxGridCellChoiceEditor(size_t count,
const wxString choices[],
bool allowOthers)
// Set the value type
if (prop->GetEditorType() == _T("choice"))
{
+#if 0
wxString* strArr = prop->GetChoices().GetStringArray();
m_attributeEditorGrid->SetCellEditor(row, 1,
new wxGridCellChoiceEditor(prop->GetChoices().GetCount(), strArr));
delete[] strArr;
+#endif
+ m_attributeEditorGrid->SetCellEditor(row, 1,
+ new wxGridCellChoiceEditor(prop->GetChoices()));
}
else if (prop->GetEditorType() == _T("integer") || prop->GetVariant().GetType() == _T("long"))
{