+#if USE_HICOMBOBOX
+static const EventTypeSpec eventList[] =
+{
+ { kEventClassTextField , kEventTextAccepted } ,
+};
+
+static pascal OSStatus wxMacComboBoxEventHandler( EventHandlerCallRef handler , EventRef event , void *data )
+{
+ OSStatus result = eventNotHandledErr;
+ wxComboBox* cb = (wxComboBox*) data;
+
+ wxMacCarbonEvent cEvent( event );
+
+ switch( cEvent.GetClass() )
+ {
+ case kEventClassTextField :
+ switch( cEvent.GetKind() )
+ {
+ case kEventTextAccepted :
+ {
+ wxCommandEvent event( wxEVT_COMMAND_COMBOBOX_SELECTED, cb->GetId() );
+ event.SetInt( cb->GetSelection() );
+ event.SetString( cb->GetStringSelection() );
+ event.SetEventObject( cb );
+ cb->HandleWindowEvent( event );
+ }
+ break;
+ default :
+ break;
+ }
+ break;
+ default :
+ break;
+ }
+
+
+ return result;
+}
+
+DEFINE_ONE_SHOT_HANDLER_GETTER( wxMacComboBoxEventHandler )
+
+#endif