set more event object fields for lbox dbl click events
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@8581 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -668,9 +668,22 @@ wxSize wxListBox::DoGetBestSize() const
|
|||||||
|
|
||||||
bool wxListBox::MSWCommand(WXUINT param, WXWORD WXUNUSED(id))
|
bool wxListBox::MSWCommand(WXUINT param, WXWORD WXUNUSED(id))
|
||||||
{
|
{
|
||||||
|
wxEventType evtType;
|
||||||
if ( param == LBN_SELCHANGE )
|
if ( param == LBN_SELCHANGE )
|
||||||
{
|
{
|
||||||
wxCommandEvent event(wxEVT_COMMAND_LISTBOX_SELECTED, m_windowId);
|
evtType = wxEVT_COMMAND_LISTBOX_SELECTED;
|
||||||
|
}
|
||||||
|
else if ( param == LBN_DBLCLK )
|
||||||
|
{
|
||||||
|
evtType = wxEVT_COMMAND_LISTBOX_DOUBLECLICKED;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
// some event we're not interested in
|
||||||
|
return FALSE;
|
||||||
|
}
|
||||||
|
|
||||||
|
wxCommandEvent event(evtType, m_windowId);
|
||||||
event.SetEventObject( this );
|
event.SetEventObject( this );
|
||||||
|
|
||||||
wxArrayInt aSelections;
|
wxArrayInt aSelections;
|
||||||
@@ -693,17 +706,6 @@ bool wxListBox::MSWCommand(WXUINT param, WXWORD WXUNUSED(id))
|
|||||||
|
|
||||||
return GetEventHandler()->ProcessEvent(event);
|
return GetEventHandler()->ProcessEvent(event);
|
||||||
}
|
}
|
||||||
else if ( param == LBN_DBLCLK )
|
|
||||||
{
|
|
||||||
wxCommandEvent event(wxEVT_COMMAND_LISTBOX_DOUBLECLICKED, m_windowId);
|
|
||||||
event.SetEventObject( this );
|
|
||||||
|
|
||||||
return GetEventHandler()->ProcessEvent(event);
|
|
||||||
}
|
|
||||||
//else:
|
|
||||||
|
|
||||||
return FALSE;
|
|
||||||
}
|
|
||||||
|
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
// wxCheckListBox support
|
// wxCheckListBox support
|
||||||
|
Reference in New Issue
Block a user