input handler should coreesponding the widget instance, wxListBox and wxCheckListBox has its own input handler, so create it differenctly

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77840 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin 2014-09-23 17:43:15 +00:00
parent 786c64e040
commit d6ae3804dd
3 changed files with 7 additions and 3 deletions

View File

@ -261,6 +261,10 @@ protected:
// and this one the client data (either void or wxClientData)
wxArrayPtrVoid m_itemsClientData;
// this is hold the input handler type. the input handler is different
// between ListBox and its subclass--CheckListbox
wxString m_inputHandlerType;
// the current item
int m_current;

View File

@ -62,6 +62,7 @@ public:
void wxCheckListBox::Init()
{
m_inputHandlerType = wxINP_HANDLER_CHECKLISTBOX;
}
wxCheckListBox::wxCheckListBox(wxWindow *parent,
@ -107,8 +108,6 @@ bool wxCheckListBox::Create(wxWindow *parent,
n, choices, style, validator, name) )
return false;
CreateInputHandler(wxINP_HANDLER_CHECKLISTBOX);
return true;
}

View File

@ -127,6 +127,7 @@ void wxListBox::Init()
m_showScrollbarX =
m_updateScrollbarY =
m_showScrollbarY = false;
m_inputHandlerType = wxINP_HANDLER_LISTBOX;
}
wxListBox::wxListBox(wxWindow *parent,
@ -198,7 +199,7 @@ bool wxListBox::Create(wxWindow *parent,
SetInitialSize(size);
CreateInputHandler(wxINP_HANDLER_LISTBOX);
CreateInputHandler(m_inputHandlerType);
return true;
}