1 /////////////////////////////////////////////////////////////////////////////
3 // Purpose: SWIG interface defs for wxChoice
7 // Created: 10-June-1998
9 // Copyright: (c) 2003 by Total Control Software
10 // Licence: wxWindows license
11 /////////////////////////////////////////////////////////////////////////////
16 //---------------------------------------------------------------------------
18 MAKE_CONST_WXSTRING(ChoiceNameStr);
20 //---------------------------------------------------------------------------
25 "A Choice control is used to select one of a list of strings.
26 Unlike a `wx.ListBox`, only the selection is visible until the
27 user pulls down the menu of choices.", "
31 ================ ==========================================
32 EVT_CHOICE Sent when an item in the list is selected.
33 ================ ==========================================
37 class wxChoice : public wxControlWithItems
40 %pythonAppend wxChoice "self._setOORInfo(self)"
41 %pythonAppend wxChoice() ""
44 wxChoice(wxWindow *parent, wxWindowID id=-1,
45 const wxPoint& pos = wxDefaultPosition,
46 const wxSize& size = wxDefaultSize,
47 const wxArrayString& choices = wxPyEmptyStringArray,
49 const wxValidator& validator = wxDefaultValidator,
50 const wxString& name = wxPyChoiceNameStr),
51 "__init__(Window parent, int id, Point pos=DefaultPosition, Size size=DefaultSize,
52 List choices=[], long style=0, Validator validator=DefaultValidator,
53 String name=ChoiceNameStr) -> Choice",
54 "Create and show a Choice control", "");
58 "Precreate a Choice control for 2-phase creation.", "",
63 bool, Create(wxWindow *parent, wxWindowID id=-1,
64 const wxPoint& pos = wxDefaultPosition,
65 const wxSize& size = wxDefaultSize,
66 const wxArrayString& choices = wxPyEmptyStringArray,
68 const wxValidator& validator = wxDefaultValidator,
69 const wxString& name = wxPyChoiceNameStr),
70 "Create(Window parent, int id, Point pos=DefaultPosition, Size size=DefaultSize,
71 List choices=[], long style=0, Validator validator=DefaultValidator,
72 String name=ChoiceNameStr) -> bool",
73 "Actually create the GUI Choice control for 2-phase creation", "");
76 // // These are only meaningful on wxMotif...
78 // void SetColumns(const int n = 1);
82 void , SetSelection(const int n),
83 "Select the n'th item (zero based) in the list.", "");
86 bool , SetStringSelection(const wxString& string),
87 "Select the item with the specifed string", "");
90 void , SetString(int n, const wxString& string),
91 "Set the label for the n'th item (zero based) in the list.", "");
94 %pythoncode { Select = SetSelection }
96 static wxVisualAttributes
97 GetClassDefaultAttributes(wxWindowVariant variant = wxWINDOW_VARIANT_NORMAL);
100 //---------------------------------------------------------------------------