.. wxPython Phoenix documentation

   This file was generated by Phoenix's sphinx generator and associated
   tools, do not edit by hand.

   Copyright: (c) 2011-2020 by Total Control Software
   License:   wxWindows License

.. include:: headings.inc

.. currentmodule:: wx.lib.combotreebox

.. highlight:: python



.. _wx.lib.combotreebox.BaseComboTreeBox:

==========================================================================================================================================
|phoenix_title|  **wx.lib.combotreebox.BaseComboTreeBox**
==========================================================================================================================================

BaseComboTreeBox is the base class for platform specific versions of the
ComboTreeBox.



|

|class_hierarchy| Class Hierarchy
=================================

.. raw:: html

   <div id="toggleBlock" onclick="return toggleVisibility(this)" class="closed" style="cursor:pointer;">
   <img id="toggleBlock-trigger" src="_static/images/closed.png"/>
   Inheritance diagram for class <strong>BaseComboTreeBox</strong>:
   </div>
   <div id="toggleBlock-summary" style="display:block;"></div>
   <div id="toggleBlock-content" style="display:none;">
   <p class="graphviz">
   <center><img src="_static/images/inheritance/wx.lib.combotreebox.BaseComboTreeBox_inheritance.png" alt="Inheritance diagram of BaseComboTreeBox" usemap="#dummy" class="inheritance"/></center>
   <script type="text/javascript">toggleVisibilityOnLoad(document.getElementById('toggleBlock'))</script>
   <map id="dummy" name="dummy"> <area shape="rect" id="node1" href="wx.lib.combotreebox.BaseComboTreeBox.html" title="wx.lib.combotreebox.BaseComboTreeBox" alt="" coords="5,5,299,35"/> </map> 
   </p>
   </div>

|


|sub_classes| Known Subclasses
==============================

:class:`wx.lib.combotreebox.GTKComboTreeBox`, :class:`wx.lib.combotreebox.NativeComboTreeBox`

|


|method_summary| Methods Summary
================================

================================================================================ ================================================================================
:meth:`~wx.lib.combotreebox.BaseComboTreeBox.__init__`                           Initialize self.  See help(type(self)) for accurate signature.
:meth:`~wx.lib.combotreebox.BaseComboTreeBox.Append`                             Adds the itemText to the control, associating the given clientData
:meth:`~wx.lib.combotreebox.BaseComboTreeBox.Clear`                              Removes all items from the control.
:meth:`~wx.lib.combotreebox.BaseComboTreeBox.Delete`                             Deletes the item from the control.
:meth:`~wx.lib.combotreebox.BaseComboTreeBox.FindClientData`                     Finds the *first* item in the tree with client data equal to the
:meth:`~wx.lib.combotreebox.BaseComboTreeBox.FindString`                         Finds the *first* item in the tree with a label equal to the
:meth:`~wx.lib.combotreebox.BaseComboTreeBox.GetClientData`                      Returns the client data associated with the given item, if any.
:meth:`~wx.lib.combotreebox.BaseComboTreeBox.GetCount`                           Returns the number of items in the control.
:meth:`~wx.lib.combotreebox.BaseComboTreeBox.GetSelection`                       Returns the :class:`TreeItemId` of the selected item or an invalid item
:meth:`~wx.lib.combotreebox.BaseComboTreeBox.GetString`                          Returns the label of the given item.
:meth:`~wx.lib.combotreebox.BaseComboTreeBox.GetStringSelection`                 Returns the label of the selected item or an empty string if no item
:meth:`~wx.lib.combotreebox.BaseComboTreeBox.GetTree`                            Returns the tree control that is popped up.
:meth:`~wx.lib.combotreebox.BaseComboTreeBox.GetValue`                           Returns the current value in the combobox text field.
:meth:`~wx.lib.combotreebox.BaseComboTreeBox.Hide`                               Hide the popped up frame with the tree.
:meth:`~wx.lib.combotreebox.BaseComboTreeBox.Insert`                             Insert an item into the control before the ``previous`` item
:meth:`~wx.lib.combotreebox.BaseComboTreeBox.IsEmpty`                            Returns ``True`` if the control is empty or ``False`` if it has some items.
:meth:`~wx.lib.combotreebox.BaseComboTreeBox.NotifyItemSelected`                 Simulate selection of an item by the user. This is meant to
:meth:`~wx.lib.combotreebox.BaseComboTreeBox.NotifyNoItemSelected`               This is called by the PopupFrame when the user closes the
:meth:`~wx.lib.combotreebox.BaseComboTreeBox.OnKeyDown`                          
:meth:`~wx.lib.combotreebox.BaseComboTreeBox.OnMouseClick`                       
:meth:`~wx.lib.combotreebox.BaseComboTreeBox.OnText`                             
:meth:`~wx.lib.combotreebox.BaseComboTreeBox.Popup`                              Pops up the frame with the tree.
:meth:`~wx.lib.combotreebox.BaseComboTreeBox.SetClientData`                      Associate the given client data with the provided item.
:meth:`~wx.lib.combotreebox.BaseComboTreeBox.SetClientDataSelection`             Selects the item with the provided clientData in the control.
:meth:`~wx.lib.combotreebox.BaseComboTreeBox.SetSelection`                       Sets the provided item to be the selected item.
:meth:`~wx.lib.combotreebox.BaseComboTreeBox.SetString`                          Sets the label for the provided item.
:meth:`~wx.lib.combotreebox.BaseComboTreeBox.SetStringSelection`                 Selects the item with the provided string in the control.
:meth:`~wx.lib.combotreebox.BaseComboTreeBox.SetValue`                           Sets the text for the combobox text field.
================================================================================ ================================================================================


|


|api| Class API
===============


.. class:: BaseComboTreeBox(object)

   BaseComboTreeBox is the base class for platform specific versions of the
   ComboTreeBox.

   .. method:: __init__(self, \*args, \*\*kwargs)

      Initialize self.  See help(type(self)) for accurate signature.


   .. method:: 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 :class:`TreeItemId` of the newly added
      item.
      
      :param string `itemText`: text to add to the control
      :keyword TreeItemId `parent`: if None item is added as a root, else it
        is added as a child of the parent.
      :keyword PyObject `clientData`: the client data to find
      :return: :class:`TreeItemId` of newly added item
      :rtype: :class:`TreeItemId`


   .. method:: Clear(self)

      Removes all items from the control.


   .. method:: Delete(self, item)

      Deletes the item from the control.


   .. method:: 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.
      
      :param PyObject `clientData`: the client data to find
      :keyword TreeItemId `parent`: :class:`TreeItemId` parent or None
      :return: :class:`TreeItemId`
      :rtype: :class:`TreeItemId`


   .. method:: 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.
      
      :param string `string`: string to be found in label
      :keyword TreeItemId `parent`: :class:`TreeItemId` parent or None
      :return: :class:`TreeItemId`
      :rtype: :class:`TreeItemId`


   .. method:: GetClientData(self, item)

      Returns the client data associated with the given item, if any.
      
      :param TreeItemId `item`: item for which to get clientData
      :return: the client data
      :rtype: PyObject


   .. method:: GetCount(self)

      Returns the number of items in the control.
      
      :return: items in control
      :rtype: integer


   .. method:: GetSelection(self)

      Returns the :class:`TreeItemId` of the selected item or an invalid item
      if no item is selected.
      
      :return: a TreeItemId
      :rtype: :class:`TreeItemId`


   .. method:: GetString(self, item)

      Returns the label of the given item.
      
      :param TreeItemId `item`: :class:`TreeItemId` for which to get the label
      :return: label
      :rtype: string


   .. method:: GetStringSelection(self)

      Returns the label of the selected item or an empty string if no item
      is selected.
      
      :return: the label of the selected item or an empty string
      :rtype: string


   .. method:: GetTree(self)

      Returns the tree control that is popped up.


   .. method:: GetValue(self)

      Returns the current value in the combobox text field.
      
      :return: the current value in the combobox text field
      :rtype: string


   .. method:: Hide(self)

      Hide the popped up frame with the tree.


   .. method:: 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.
      
      :param string `itemText`: the items label
      :keyword TreeItemId `previous`: the previous item
      :keyword TreeItemId `parent`: the parent item
      :keyword PyObject `clientData`: the data to associate
      :return: the create :class:`TreeItemId`
      :rtype: :class:`TreeItemId`


   .. method:: IsEmpty(self)

      Returns ``True`` if the control is empty or ``False`` if it has some items.
      
      :return: ``True`` if control is empty
      :rtype: boolean


   .. method:: 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.


   .. method:: NotifyNoItemSelected(self)

      This is called by the PopupFrame when the user closes the
      PopupFrame, without selecting an item.


   .. method:: OnKeyDown(self, keyEvent)


   .. method:: OnMouseClick(self, event)


   .. method:: OnText(self, event)


   .. method:: Popup(self)

      Pops up the frame with the tree.


   .. method:: SetClientData(self, item, clientData)

      Associate the given client data with the provided item.
      
      :param TreeItemId `item`: item for which to set the clientData
      :param PyObject `clientData`: the data to set


   .. method:: 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.
      
      :param PyObject `clientData`: the client data to find
      :return: ``True`` if an item has been selected, otherwise ``False`` :rtype: bool


   .. method:: SetSelection(self, item)

      Sets the provided item to be the selected item.
      
      :param TreeItemId `item`: Select this item


   .. method:: SetString(self, item, string)

      Sets the label for the provided item.
      
      :param TreeItemId `item`: item on which to set the label
      :param string `string`: the label to set


   .. method:: 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.
      
      :param string `string`: try to select the item with this string
      :return: ``True`` if an item has been selected
      :rtype: boolean


   .. method:: 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.
      
      :param string `value`: set the combobox text field


