1 /////////////////////////////////////////////////////////////////////////////
3 // Purpose: SWIG interface defs for wxComboBox
7 // Created: 10-June-1998
9 // Copyright: (c) 2003 by Total Control Software
10 // Licence: wxWindows license
11 /////////////////////////////////////////////////////////////////////////////
16 //---------------------------------------------------------------------------
18 MAKE_CONST_WXSTRING(ComboBoxNameStr);
20 //---------------------------------------------------------------------------
25 "A combobox is like a combination of an edit control and a listbox. It can be
26 displayed as static list with editable or read-only text field; or a drop-down
27 list with text field.");
31 wx.CB_SIMPLE: Creates a combobox with a permanently displayed list.
34 wx.CB_DROPDOWN: Creates a combobox with a drop-down list.
36 wx.CB_READONLY: Same as wxCB_DROPDOWN but only the strings specified as
37 the combobox choices can be selected, it is impossible
38 to select (even from a program) a string which is not in
41 wx.CB_SORT: Sorts the entries in the list alphabetically.
45 EVT_COMBOBOX: Sent when an item on the list is selected.
46 EVT_TEXT: Sent when the combobox text changes.
52 class wxComboBox : public wxChoice
54 class wxComboBox : public wxControl, public wxItemContainer
58 %pythonAppend wxComboBox "self._setOORInfo(self)"
59 %pythonAppend wxComboBox() ""
61 RefDoc(wxComboBox, ""); // turn it off for the ctors
64 wxComboBox(wxWindow* parent, wxWindowID id=-1,
65 const wxString& value = wxPyEmptyString,
66 const wxPoint& pos = wxDefaultPosition,
67 const wxSize& size = wxDefaultSize,
68 const wxArrayString& choices = wxPyEmptyStringArray,
70 const wxValidator& validator = wxDefaultValidator,
71 const wxString& name = wxPyComboBoxNameStr),
72 "__init__(Window parent, int id, String value=EmptyString,\n"
73 " Point pos=DefaultPosition, Size size=DefaultSize,\n"
74 " List choices=[], long style=0, Validator validator=DefaultValidator,\n"
75 " String name=ComboBoxNameStr) -> ComboBox",
76 "Constructor, creates and shows a ComboBox control.");
80 "Precreate a ComboBox control for 2-phase creation.",
85 bool, Create(wxWindow *parent, wxWindowID id=-1,
86 const wxString& value = wxPyEmptyString,
87 const wxPoint& pos = wxDefaultPosition,
88 const wxSize& size = wxDefaultSize,
89 const wxArrayString& choices = wxPyEmptyStringArray,
91 const wxValidator& validator = wxDefaultValidator,
92 const wxString& name = wxPyChoiceNameStr),
93 "Create(Window parent, int id, String value=EmptyString,\n"
94 " Point pos=DefaultPosition, Size size=DefaultSize,\n"
95 " List choices=[], long style=0, Validator validator=DefaultValidator,\n"
96 " String name=ChoiceNameStr) -> bool",
97 "Actually create the GUI wxComboBox control for 2-phase creation");
101 virtual wxString , GetValue() const,
102 "Returns the current value in the combobox text field.");
105 virtual void , SetValue(const wxString& value),
110 virtual void , Copy(),
111 "Copies the selected text to the clipboard.");
114 virtual void , Cut(),
115 "Copies the selected text to the clipboard and removes the selection.");
118 virtual void , Paste(),
119 "Pastes text from the clipboard to the text field.");
123 virtual void , SetInsertionPoint(long pos),
124 "Sets the insertion point in the combobox text field.");
127 virtual long , GetInsertionPoint() const,
128 "Returns the insertion point for the combobox's text field.");
131 virtual long , GetLastPosition() const,
132 "Returns the last position in the combobox text field.");
135 virtual void , Replace(long from, long to, const wxString& value),
136 "Replaces the text between two positions with the given text, in the\n"
137 "combobox text field.");
140 void , SetSelection(int n),
141 "Selects the text between the two positions, in the combobox text field.");
143 %name(SetMark) virtual void SetSelection(long from, long to);
146 virtual void , SetEditable(bool editable),
151 virtual void , SetInsertionPointEnd(),
152 "Sets the insertion point at the end of the combobox text field.");
155 virtual void , Remove(long from, long to),
156 "Removes the text between the two positions in the combobox text field.");
160 //---------------------------------------------------------------------------