1 /////////////////////////////////////////////////////////////////////////////
2 // Name: univ/choice.cpp
3 // Purpose: wxChoice implementation
4 // Author: Vadim Zeitlin
8 // Copyright: (c) 2000 SciTech Software, Inc. (www.scitechsoft.com)
9 // Licence: wxWindows licence
10 /////////////////////////////////////////////////////////////////////////////
12 // ============================================================================
14 // ============================================================================
16 // ----------------------------------------------------------------------------
18 // ----------------------------------------------------------------------------
20 #if defined(__GNUG__) && !defined(NO_GCC_PRAGMA)
21 #pragma implementation "univchoice.h"
24 #include "wx/wxprec.h"
33 #include "wx/choice.h"
36 IMPLEMENT_DYNAMIC_CLASS(wxChoice
, wxControl
)
38 BEGIN_EVENT_TABLE(wxChoice
, wxComboBox
)
39 EVT_COMBOBOX(-1, wxChoice::OnComboBox
)
42 bool wxChoice::Create(wxWindow
*parent
, wxWindowID id
,
45 int n
, const wxString choices
[],
47 const wxValidator
& validator
,
53 return wxComboBox::Create(parent
, id
, value
,
54 pos
, size
, n
, choices
,
55 wxCB_READONLY
, validator
, name
);
59 void wxChoice::OnComboBox(wxCommandEvent
& event
)
61 if ( event
.GetId() == GetId() )
63 event
.SetEventType(wxEVT_COMMAND_CHOICE_SELECTED
);
65 GetEventHandler()->ProcessEvent(event
);
71 #endif // wxUSE_CHOICE