- wxCommandEvent event(wxEVT_COMMAND_LISTBOX_SELECTED, m_windowId);
- event.SetEventObject( this );
-
- wxArrayInt aSelections;
- int n, count = GetSelections(aSelections);
- if ( count > 0 )
- {
- n = aSelections[0];
- if ( HasClientObjectData() )
- event.SetClientObject( GetClientObject(n) );
- else if ( HasClientUntypedData() )
- event.SetClientData( GetClientData(n) );
- event.SetString( GetString(n) );
- }
- else
- {
- n = -1;
- }
-
- event.m_commandInt = n;
-
- return GetEventHandler()->ProcessEvent(event);