Home | Trees | Index | Help |
|
---|
Package wx :: Class ComboBox |
|
object
--+ |Object
--+ |EvtHandler
--+ |Window
--+ |Control
--+ |object
--+ | | |ItemContainer
--+ | ComboBox
BaseMaskedComboBox
A combobox is like a combination of an edit control and a listbox. It can be displayed as static list with editable or read-only text field; or a drop-down list with text field.
A combobox permits a single selection only. Combobox items are numbered from zero.
wx.CB_SIMPLE Creates a combobox with a permanently displayed list. Windows only. wx.CB_DROPDOWN Creates a combobox with a drop-down list. wx.CB_READONLY Same as wxCB_DROPDOWN but only the strings specified as the combobox choices can be selected, it is impossible to select (even from a program) a string which is not in the choices list. wx.CB_SORT Sorts the entries in the list alphabetically.
EVT_COMBOBOX Sent when an item on the list is selected. Note that calling GetValue
in this handler will return the newly selected value.EVT_TEXT Sent when the combobox text changes. EVT_TEXT_ENTER Sent when the RETURN/ENTER key is pressed in the combobox.
Method Summary | |
---|---|
ComboBox |
Constructor, creates and shows a ComboBox control. |
bool |
Returns True if the combobox is editable and there is a text selection to copy to the clipboard. |
bool |
Returns True if the combobox is editable and there is a text selection to copy to the clipboard. |
bool |
Returns True if the combobox is editable and there is text on the clipboard that can be pasted into the text field. |
bool |
Returns True if the combobox is editable and the last undo can be redone. |
bool |
Returns True if the combobox is editable and the last edit can be undone. |
Copies the selected text to the clipboard. | |
bool |
Actually create the GUI wxComboBox control for 2-phase creation |
Copies the selected text to the clipboard and removes the selection. | |
VisualAttributes |
Get the default attributes for this class. (Static method) |
int |
Unlike GetSelection which only returns the accepted selection value,
i.e. |
long |
Returns the insertion point for the combobox's text field. |
long |
Returns the last position in the combobox text field. |
(from, to) |
Gets the positions of the begining and ending of the selection mark in the combobox text field. |
String |
Returns the current value in the combobox text field. |
bool |
Returns True if the combo is ediatable (not read-only.) |
Pastes text from the clipboard to the text field. | |
Undoes the last edit in the text field. | |
Removes the text between the two positions in the combobox text field. | |
Replaces the text between two positions with the given text, in the combobox text field. | |
Select all the text in the combo's text field. | |
SetEditable(self,
editable)
| |
Sets the insertion point in the combobox text field. | |
Sets the insertion point at the end of the combobox text field. | |
Selects the text between the two positions in the combobox text field. | |
bool |
Select the item with the specifed string |
SetValue(self,
value)
| |
Redoes the last undo in the text field. |
Property Summary | |
---|---|
CurrentSelection : See GetCurrentSelection | |
InsertionPoint : See GetInsertionPoint and SetInsertionPoint | |
LastPosition : See GetLastPosition | |
Mark : See GetMark and SetMark | |
thisown : The membership flag | |
Value : See GetValue and SetValue |
Instance Method Details |
---|
__init__(parent,
id=-1,
value=EmptyString,
pos=DefaultPosition,
size=DefaultSize,
choices=EmptyList,
style=0,
validator=DefaultValidator,
name=ComboBoxNameStr)
|
CanCopy(self)Returns True if the combobox is editable and there is a text selection to copy to the clipboard. Only available on Windows.
|
CanCut(self)Returns True if the combobox is editable and there is a text selection to copy to the clipboard. Only available on Windows.
|
CanPaste(self)Returns True if the combobox is editable and there is text on the clipboard that can be pasted into the text field. Only available on Windows.
|
CanRedo(self)Returns True if the combobox is editable and the last undo can be redone. Only available on Windows.
|
CanUndo(self)Returns True if the combobox is editable and the last edit can be undone. Only available on Windows.
|
Copy(self)Copies the selected text to the clipboard. |
Create(parent, id=-1, value=EmptyString, pos=DefaultPosition, size=DefaultSize, choices=EmptyList, style=0, validator=DefaultValidator, name=ChoiceNameStr)Actually create the GUI wxComboBox control for 2-phase creation
|
Cut(self)Copies the selected text to the clipboard and removes the selection. |
GetCurrentSelection(self)Unlike
|
GetInsertionPoint(self)Returns the insertion point for the combobox's text field.
|
GetLastPosition(self)Returns the last position in the combobox text field.
|
GetMark(self)Gets the positions of the begining and ending of the selection mark in the combobox text field.
|
GetValue(self)Returns the current value in the combobox text field.
|
IsEditable(self)Returns True if the combo is ediatable (not read-only.)
|
Paste(self)Pastes text from the clipboard to the text field. |
Redo(self)Undoes the last edit in the text field. Windows only. |
Remove(self, from, to)Removes the text between the two positions in the combobox text field.
|
Replace(self, from, to, value)Replaces the text between two positions with the given text, in the combobox text field.
|
SelectAll(self)Select all the text in the combo's text field. |
SetInsertionPoint(self, pos)Sets the insertion point in the combobox text field.
|
SetInsertionPointEnd(self)Sets the insertion point at the end of the combobox text field. |
SetMark(self, from, to)Selects the text between the two positions in the combobox text field.
|
SetStringSelection(self, string)Select the item with the specifed string
|
Undo(self)Redoes the last undo in the text field. Windows only. |
Static Method Details |
---|
GetClassDefaultAttributes(variant=WINDOW_VARIANT_NORMAL)Get the default attributes for this class. This is useful if you want to use the same font or colour in your own control as in a standard control -- which is a much better idea than hard coding specific colours or fonts which might look completely out of place on the user's system, especially if it uses themes. The variant parameter is only relevant under Mac currently and is
ignore under other platforms. Under Mac, it will change the size of
the returned font. See
|
Property Details |
---|
CurrentSelection
|
InsertionPointSee
|
LastPositionSee
|
Mark |
thisownThe membership flag |
Value |
Home | Trees | Index | Help |
|
---|
Generated by Epydoc 2.1.20050511.rpd on Thu Mar 22 12:08:54 2007 | http://epydoc.sf.net |