X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/cb0afb266214f827417c42474168c7edda7c953e..3a7d5f7cc3892d15ee8de373b8ab52d4bc1eabf8:/src/msw/listbox.cpp diff --git a/src/msw/listbox.cpp b/src/msw/listbox.cpp index b795ef947e..9e4b653af8 100644 --- a/src/msw/listbox.cpp +++ b/src/msw/listbox.cpp @@ -251,6 +251,20 @@ bool wxListBox::Create(wxWindow *parent, return TRUE; } +bool wxListBox::Create(wxWindow *parent, + wxWindowID id, + const wxPoint& pos, + const wxSize& size, + const wxArrayString& choices, + long style, + const wxValidator& validator, + const wxString& name) +{ + wxCArrayString chs(choices); + return Create(parent, id, pos, size, chs.GetCount(), chs.GetStrings(), + style, validator, name); +} + wxListBox::~wxListBox() { Free(); @@ -400,7 +414,8 @@ void wxListBox::Free() void wxListBox::SetSelection(int N, bool select) { - wxCHECK_RET( N >= 0 && N < m_noItems, + wxCHECK_RET( N == wxNOT_FOUND || + (N >= 0 && N < m_noItems), wxT("invalid index in wxListBox::SetSelection") ); if ( HasMultipleSelection() )