BaseComboTreeBox is the base class for platform specific versions of the ComboTreeBox.
__init__ |
|
Append |
Adds the itemText to the control, associating the given clientData |
Clear |
Removes all items from the control. |
Delete |
Deletes the item from the control. |
FindClientData |
Finds the first item in the tree with client data equal to the |
FindString |
Finds the first item in the tree with a label equal to the |
GetClientData |
Returns the client data associated with the given item, if any. |
GetCount |
Returns the number of items in the control. |
GetSelection |
Returns the TreeItemId of the selected item or an invalid item |
GetString |
Returns the label of the given item. |
GetStringSelection |
Returns the label of the selected item or an empty string if no item |
GetTree |
Returns the tree control that is popped up. |
GetValue |
Returns the current value in the combobox text field. |
Hide |
Hide the popped up frame with the tree. |
Insert |
Insert an item into the control before the previous item |
IsEmpty |
Returns True if the control is empty or False if it has some items. |
NotifyItemSelected |
Simulate selection of an item by the user. This is meant to |
NotifyNoItemSelected |
This is called by the PopupFrame when the user closes the |
OnKeyDown |
|
OnMouseClick |
|
OnText |
|
Popup |
Pops up the frame with the tree. |
SetClientData |
Associate the given client data with the provided item. |
SetClientDataSelection |
Selects the item with the provided clientData in the control. |
SetSelection |
Sets the provided item to be the selected item. |
SetString |
Sets the label for the provided item. |
SetStringSelection |
Selects the item with the provided string in the control. |
SetValue |
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)¶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.
Parameters: |
|
---|---|
Returns: |
|
Return type: |
|
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.
Parameters: |
|
---|---|
Returns: |
|
Return type: |
|
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.
Parameters: |
|
---|---|
Returns: |
|
Return type: |
|
GetClientData
(self, item)¶Returns the client data associated with the given item, if any.
Parameters: | item (TreeItemId) – item for which to get clientData |
---|---|
Returns: | the client data |
Return type: | PyObject |
GetCount
(self)¶Returns the number of items in the control.
Returns: | items in control |
---|---|
Return type: | integer |
GetSelection
(self)¶Returns the TreeItemId
of the selected item or an invalid item
if no item is selected.
Returns: | a TreeItemId |
---|---|
Return type: | TreeItemId |
GetString
(self, item)¶Returns the label of the given item.
Parameters: | item (TreeItemId) – TreeItemId for which to get the label |
---|---|
Returns: | label |
Return type: | string |
GetStringSelection
(self)¶Returns the label of the selected item or an empty string if no item is selected.
Returns: | the label of the selected item or an empty string |
---|---|
Return type: | string |
GetTree
(self)¶Returns the tree control that is popped up.
GetValue
(self)¶Returns the current value in the combobox text field.
Returns: | the current value in the combobox text field |
---|---|
Return type: | 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.
Parameters: |
|
---|---|
Returns: | the create |
Return type: |
|
IsEmpty
(self)¶Returns True
if the control is empty or False
if it has some items.
Returns: | True if control is empty |
---|---|
Return type: | 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.
Parameters: |
|
---|
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.
Parameters: | clientData (PyObject) – the client data to find |
---|---|
Returns: | True if an item has been selected, otherwise False :rtype: bool |
SetSelection
(self, item)¶Sets the provided item to be the selected item.
Parameters: | item (TreeItemId) – Select this item |
---|
SetString
(self, item, string)¶Sets the label for the provided item.
Parameters: |
|
---|
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.
Parameters: | string (string) – try to select the item with this string |
---|---|
Returns: | True if an item has been selected |
Return type: | 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.
Parameters: | value (string) – set the combobox text field |
---|