 wx.lib.combotreebox.BaseComboTreeBox¶
  wx.lib.combotreebox.BaseComboTreeBox¶
BaseComboTreeBox is the base class for platform specific versions of the ComboTreeBox.
 Class Hierarchy¶
 Class Hierarchy¶
 Known Subclasses¶
 Known Subclasses¶
wx.lib.combotreebox.GTKComboTreeBox, wx.lib.combotreebox.NativeComboTreeBox
 Methods Summary¶
 Methods Summary¶
| 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. | 
 Class API¶
 Class API¶
- class BaseComboTreeBox(object)¶
- BaseComboTreeBox is the base class for platform specific versions of the ComboTreeBox. 
 - Methods¶- __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 - TreeItemIdof the newly added item.- Parameters:
- 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 
 
- Returns:
- TreeItemIdof newly added item
- Return type:
- 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. - Parameters:
- clientData (PyObject) – the client data to find 
- parent (TreeItemId) – - TreeItemIdparent or None
 
- Returns:
- TreeItemId
- Return type:
- 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. - Parameters:
- string (string) – string to be found in label 
- parent (TreeItemId) – - TreeItemIdparent or None
 
- Returns:
- TreeItemId
- Return type:
- TreeItemId
 
 - 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 - TreeItemIdof 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) – - TreeItemIdfor 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 - previousitem and/or as child of the- parentitem. The itemText is associated with clientData when not None.- Parameters:
- itemText (string) – the items label 
- previous (TreeItemId) – the previous item 
- parent (TreeItemId) – the parent item 
- clientData (PyObject) – the data to associate 
 
- Returns:
- the create - TreeItemId
- Return type:
- TreeItemId
 
 - IsEmpty(self)¶
- Returns - Trueif the control is empty or- Falseif it has some items.- Returns:
- Trueif 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:
- 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 - Trueif the item belonging to the clientData has been selected,- Falseif it wasn’t found in the control.- Parameters:
- clientData (PyObject) – the client data to find 
- Returns:
- Trueif 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:
- 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 - Trueif the provided string has been selected,- Falseif it wasn’t found in the control.- Parameters:
- string (string) – try to select the item with this string 
- Returns:
- Trueif 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 
 
 
