- event.SetString(GetString(n));
- event.SetExtraLong( HasMultipleSelection() ? IsSelected(n) : true );
- }
+ wxCommandEvent event(evtType, m_windowId);
+ event.SetEventObject(this);
+
+ if ( HasClientObjectData() )
+ event.SetClientObject( GetClientObject(n) );
+ else if ( HasClientUntypedData() )
+ event.SetClientData( GetClientData(n) );