wxEND_HANDLERS_TABLE()
wxCONSTRUCTOR_5( wxComboBox , wxWindow* , Parent , wxWindowID , Id , wxString , Value , wxPoint , Position , wxSize , Size )
+
#else
+
IMPLEMENT_DYNAMIC_CLASS(wxComboBox, wxControl)
+#endif
+
BEGIN_EVENT_TABLE(wxComboBox, wxControl)
EVT_MENU(wxID_CUT, wxComboBox::OnCut)
EVT_MENU(wxID_COPY, wxComboBox::OnCopy)
EVT_UPDATE_UI(wxID_SELECTALL, wxComboBox::OnUpdateSelectAll)
END_EVENT_TABLE()
-#endif
-
// ----------------------------------------------------------------------------
// function prototypes
// ----------------------------------------------------------------------------
m_value = wxEmptyString;
else
m_value = GetString(wParam);
+ m_selectionOld = -1;
break;
}
InitCommandEvent(event);
event.SetString(GetValue());
event.SetInt(GetSelection());
- ProcessCommand(event);
+ if ( ProcessCommand(event) )
+ {
+ // don't let the event through to the native control
+ // because it doesn't need it and may generate an annoying
+ // beep if it gets it
+ return true;
+ }
}
return HandleChar(wParam, lParam, true /* isASCII */);
}
int wxComboBox::GetSelection() const
-{
- return wxChoice::GetSelection();
+{
+ return wxChoice::GetSelection();
}
// ----------------------------------------------------------------------------