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() ""
40 RefDoc(wxChoice, ""); // turn it off for the ctors
43 wxChoice(wxWindow *parent, wxWindowID id=-1,
44 const wxPoint& pos = wxDefaultPosition,
45 const wxSize& size = wxDefaultSize,
46 const wxArrayString& choices = wxPyEmptyStringArray,
48 const wxValidator& validator = wxDefaultValidator,
49 const wxString& name = wxPyChoiceNameStr),
50 "__init__(Window parent, int id, Point pos=DefaultPosition, Size size=DefaultSize,\n"
51 " List choices=[], long style=0, Validator validator=DefaultValidator,\n"
52 " String name=ChoiceNameStr) -> Choice",
53 "Create and show a Choice control");
57 "Precreate a Choice control for 2-phase creation.",
62 bool, Create(wxWindow *parent, wxWindowID id=-1,
63 const wxPoint& pos = wxDefaultPosition,
64 const wxSize& size = wxDefaultSize,
65 const wxArrayString& choices = wxPyEmptyStringArray,
67 const wxValidator& validator = wxDefaultValidator,
68 const wxString& name = wxPyChoiceNameStr),
69 "Create(Window parent, int id, Point pos=DefaultPosition, Size size=DefaultSize,\n"
70 " List choices=[], long style=0, Validator validator=DefaultValidator,\n"
71 " String name=ChoiceNameStr) -> bool",
72 "Actually create the GUI Choice control for 2-phase creation");
75 // // These are only meaningful on wxMotif...
77 // void SetColumns(const int n = 1);
81 void , SetSelection(const int n),
82 "Select the n'th item (zero based) in the list.");
85 bool , SetStringSelection(const wxString& string),
86 "Select the item with the specifed string");
89 void , SetString(int n, const wxString& string),
90 "Set the label for the n'th item (zero based) in the list.");
93 %pythoncode { Select = SetSelection }
96 //---------------------------------------------------------------------------