From 799cea003189f91d556d4bfc3076257d496dcc2e Mon Sep 17 00:00:00 2001 From: =?utf8?q?V=C3=A1clav=20Slav=C3=ADk?= Date: Sun, 15 Sep 2002 18:07:32 +0000 Subject: [PATCH] fixed two-step creation of wxCheckListBox git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@17200 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- include/wx/msw/checklst.h | 8 ++++++++ src/msw/checklst.cpp | 15 +++++++++++++-- 2 files changed, 21 insertions(+), 2 deletions(-) diff --git a/include/wx/msw/checklst.h b/include/wx/msw/checklst.h index b8b1eb28fb..7b7db054e4 100644 --- a/include/wx/msw/checklst.h +++ b/include/wx/msw/checklst.h @@ -37,6 +37,14 @@ public: const wxValidator& validator = wxDefaultValidator, const wxString& name = wxListBoxNameStr); + bool Create(wxWindow *parent, wxWindowID id, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + int n = 0, const wxString choices[] = NULL, + long style = 0, + const wxValidator& validator = wxDefaultValidator, + const wxString& name = wxListBoxNameStr); + // override base class virtuals virtual void Delete(int n); diff --git a/src/msw/checklst.cpp b/src/msw/checklst.cpp index 028e5db445..d72f1c609e 100644 --- a/src/msw/checklst.cpp +++ b/src/msw/checklst.cpp @@ -286,10 +286,21 @@ wxCheckListBox::wxCheckListBox(wxWindow *parent, wxWindowID id, long style, const wxValidator& val, const wxString& name) { - Create(parent, id, pos, size, nStrings, choices, - style | wxLB_OWNERDRAW, val, name); + Create(parent, id, pos, size, nStrings, choices, style, val, name); } +bool wxCheckListBox::Create(wxWindow *parent, wxWindowID id, + const wxPoint& pos, const wxSize& size, + int n, const wxString choices[], + long style, + const wxValidator& validator, const wxString& name) +{ + return wxListBox::Create(parent, id, pos, size, n, choices, + style | wxLB_OWNERDRAW, validator, name); +} + + + void wxCheckListBox::Delete(int N) { wxCHECK_RET( N >= 0 && N < m_noItems, -- 2.45.2