- {
- m_strings = (wxSortedArrayString *)NULL;
- }
-
- for (int i = 0; i < n; i++)
- {
- // add one by one
- DoAppend(choices[i]);
- }
-
- m_parent->DoAddChild( this );
-
- PostCreation(size);
- SetBestSize(size); // need this too because this is a wxControlWithItems
-
- return TRUE;
-}
-
-wxListBox::~wxListBox()
-{
- m_hasVMT = FALSE;
-
- Clear();
-
- if (m_strings)
- delete m_strings;
-}
-
-// ----------------------------------------------------------------------------
-// adding items
-// ----------------------------------------------------------------------------
-
-void wxListBox::DoInsertItems(const wxArrayString& items, int pos)
-{
- wxCHECK_RET( m_list != NULL, wxT("invalid listbox") );
-
- // VZ: notice that InsertItems knows nothing about sorting, so calling it
- // from outside (and not from our own Append) is likely to break
- // everything
-
- // code elsewhere supposes we have as many items in m_clientList as items
- // in the listbox
- wxASSERT_MSG( m_clientList.GetCount() == (size_t)GetCount(),
- wxT("bug in client data management") );