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. Unlike a ListBox,
26 only the selection is visible until the user pulls down the menu of choices.");
30 EVT_CHOICE: Sent when an item in the list is selected.
34 class wxChoice : public wxControlWithItems
37 %pythonAppend wxChoice "self._setOORInfo(self)"
38 %pythonAppend wxChoice() ""
41 wxChoice(wxWindow *parent, wxWindowID id,
42 const wxPoint& pos = wxDefaultPosition,
43 const wxSize& size = wxDefaultSize,
44 const wxArrayString& choices = wxPyEmptyStringArray,
46 const wxValidator& validator = wxDefaultValidator,
47 const wxString& name = wxPyChoiceNameStr),
48 "__init__(Window parent, int id, Point pos=DefaultPosition, Size size=DefaultSize,\n"
49 " List choices=[], long style=0, Validator validator=DefaultValidator,\n"
50 " String name=ChoiceNameStr) -> Choice",
51 "Create and show a Choice control");
55 "Precreate a Choice control for 2-phase creation.",
60 bool, Create(wxWindow *parent, wxWindowID id,
61 const wxPoint& pos = wxDefaultPosition,
62 const wxSize& size = wxDefaultSize,
63 const wxArrayString& choices = wxPyEmptyStringArray,
65 const wxValidator& validator = wxDefaultValidator,
66 const wxString& name = wxPyChoiceNameStr),
67 "Create(Window parent, int id, Point pos=DefaultPosition, Size size=DefaultSize,\n"
68 " List choices=[], long style=0, Validator validator=DefaultValidator,\n"
69 " String name=ChoiceNameStr) -> bool",
70 "Actually create the GUI Choice control for 2-phase creation");
73 // // These are only meaningful on wxMotif...
75 // void SetColumns(const int n = 1);
79 void , SetSelection(const int n),
80 "Select the n'th item (zero based) in the list.");
83 void , SetStringSelection(const wxString& string),
84 "Select the item with the specifed string");
87 void , SetString(int n, const wxString& string),
88 "Set the label for the n'th item (zero based) in the list.");
91 %pythoncode { Select = SetSelection }
94 //---------------------------------------------------------------------------