BaseComboTreeBox is the base class for platform specific versions of the ComboTreeBox.
wx.lib.combotreebox.GTKComboTreeBox
, wx.lib.combotreebox.NativeComboTreeBox
Initialize self. See help(type(self)) for accurate signature. |
|
Adds the itemText to the control, associating the given clientData |
|
Removes all items from the control. |
|
Deletes the item from the control. |
|
Finds the first item in the tree with client data equal to the |
|
Finds the first item in the tree with a label equal to the |
|
Returns the client data associated with the given item, if any. |
|
Returns the number of items in the control. |
|
Returns the |
|
Returns the label of the given item. |
|
Returns the label of the selected item or an empty string if no item |
|
Returns the tree control that is popped up. |
|
Returns the current value in the combobox text field. |
|
Hide the popped up frame with the tree. |
|
Insert an item into the control before the |
|
Returns |
|
Simulate selection of an item by the user. This is meant to |
|
This is called by the PopupFrame when the user closes the |
|
Pops up the frame with the tree. |
|
Associate the given client data with the provided item. |
|
Selects the item with the provided clientData in the control. |
|
Sets the provided item to be the selected item. |
|
Sets the label for the provided item. |
|
Selects the item with the provided string in the control. |
|
Sets the text for the combobox text field. |
BaseComboTreeBox
(object)¶BaseComboTreeBox is the base class for platform specific versions of the ComboTreeBox.
__init__
(self, *args, **kwargs)¶Initialize self. See help(type(self)) for accurate signature.
Append
(self, itemText, parent=None, clientData=None)¶Adds the itemText to the control, associating the given clientData
with the item if not None. If parent is None, itemText is added
as a root item, else itemText is added as a child item of
parent. The return value is the TreeItemId
of the newly added
item.
itemText (string) – text to add to the control
parent (TreeItemId) – if None item is added as a root, else it is added as a child of the parent.
clientData (PyObject) – the client data to find
TreeItemId
of newly added item
TreeItemId
Clear
(self)¶Removes all items from the control.
Delete
(self, item)¶Deletes the item from the control.
FindClientData
(self, clientData, parent=None)¶Finds the first item in the tree with client data equal to the given clientData. If no such item exists, an invalid item is returned.
clientData (PyObject) – the client data to find
parent (TreeItemId) – TreeItemId
parent or None
TreeItemId
TreeItemId
FindString
(self, string, parent=None)¶Finds the first item in the tree with a label equal to the given string. If no such item exists, an invalid item is returned.
string (string) – string to be found in label
parent (TreeItemId) – TreeItemId
parent or None
TreeItemId
TreeItemId
GetClientData
(self, item)¶Returns the client data associated with the given item, if any.
item (TreeItemId) – item for which to get clientData
the client data
PyObject
GetCount
(self)¶Returns the number of items in the control.
items in control
integer
GetSelection
(self)¶Returns the TreeItemId
of the selected item or an invalid item
if no item is selected.
a TreeItemId
TreeItemId
GetString
(self, item)¶Returns the label of the given item.
item (TreeItemId) – TreeItemId
for which to get the label
label
string
GetStringSelection
(self)¶Returns the label of the selected item or an empty string if no item is selected.
the label of the selected item or an empty string
string
GetTree
(self)¶Returns the tree control that is popped up.
GetValue
(self)¶Returns the current value in the combobox text field.
the current value in the combobox text field
string
Hide
(self)¶Hide the popped up frame with the tree.
Insert
(self, itemText, previous=None, parent=None, clientData=None)¶Insert an item into the control before the previous
item
and/or as child of the parent
item. The itemText is associated
with clientData when not None.
itemText (string) – the items label
previous (TreeItemId) – the previous item
parent (TreeItemId) – the parent item
clientData (PyObject) – the data to associate
the create TreeItemId
TreeItemId
IsEmpty
(self)¶Returns True
if the control is empty or False
if it has some items.
True
if control is empty
boolean
NotifyItemSelected
(self, text)¶Simulate selection of an item by the user. This is meant to be called by the PopupFrame when the user selects an item.
NotifyNoItemSelected
(self)¶This is called by the PopupFrame when the user closes the PopupFrame, without selecting an item.
OnKeyDown
(self, keyEvent)¶OnMouseClick
(self, event)¶OnText
(self, event)¶Popup
(self)¶Pops up the frame with the tree.
SetClientData
(self, item, clientData)¶Associate the given client data with the provided item.
item (TreeItemId) – item for which to set the clientData
clientData (PyObject) – the data to set
SetClientDataSelection
(self, clientData)¶Selects the item with the provided clientData in the control.
Returns True
if the item belonging to the clientData has been
selected, False
if it wasn’t found in the control.
clientData (PyObject) – the client data to find
True
if an item has been selected, otherwise False
:rtype: bool
SetSelection
(self, item)¶Sets the provided item to be the selected item.
item (TreeItemId) – Select this item
SetString
(self, item, string)¶Sets the label for the provided item.
item (TreeItemId) – item on which to set the label
string (string) – the label to set
SetStringSelection
(self, string)¶Selects the item with the provided string in the control.
Returns True
if the provided string has been selected, False
if
it wasn’t found in the control.
string (string) – try to select the item with this string
True
if an item has been selected
boolean
SetValue
(self, value)¶Sets the text for the combobox text field.
NB: For a combobox with wxCB_READONLY style the string must be in the combobox choices list, otherwise the call to SetValue() is ignored.
value (string) – set the combobox text field