.. wxPython Phoenix documentation

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

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

.. include:: headings.inc

.. currentmodule:: wx.lib.combotreebox

.. highlight:: python



.. _wx.lib.combotreebox.MSWComboTreeBox:

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

MSWComboTreeBox adds one piece of functionality as compared to
NativeComboTreeBox: when the user browses through the tree, the
ComboTreeBox's text field is continuously updated to show the
currently selected item in the tree. If the user cancels
selecting a new item from the tree, e.g. by hitting escape, the
previous value (the one that was selected before the PopupFrame
was popped up) is restored.



|

|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>MSWComboTreeBox</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.MSWComboTreeBox_inheritance.png" alt="Inheritance diagram of MSWComboTreeBox" 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.MSWComboTreeBox.html" title="MSWComboTreeBox adds one piece of functionality as compared to" alt="" coords="121,547,423,576"/> <area shape="rect" id="node2" href="wx.lib.combotreebox.NativeComboTreeBox.html" title="NativeComboTreeBox, and any subclass, uses the native ComboBox as basis," alt="" coords="116,469,428,499"/> <area shape="rect" id="node3" href="wx.lib.combotreebox.BaseComboTreeBox.html" title="BaseComboTreeBox is the base class for platform specific versions of the" alt="" coords="5,392,307,421"/> <area shape="rect" id="node4" href="wx.ComboBox.html" title="A combobox is like a combination of an edit control and a listbox." alt="" coords="331,392,448,421"/> <area shape="rect" id="node5" href="wx.Control.html" title="This is the base class for a control or 'widget'." alt="" coords="192,315,285,344"/> <area shape="rect" id="node6" href="wx.ItemContainer.html" title="This class is an abstract base class for some wxWidgets controls which contain several items such as wx.ListBox, wx.CheckListBox, wx.ComboBox  or wx.Choice." alt="" coords="319,315,459,344"/> <area shape="rect" id="node7" href="wx.TextEntry.html" title="Common base class for single line text entry fields." alt="" coords="484,315,593,344"/> <area shape="rect" id="node8" href="wx.Window.html" title="wx.Window  is the base class for all windows and represents any visible object on screen." alt="" coords="171,237,269,267"/> <area shape="rect" id="node9" href="wx.WindowBase.html" title="wx.WindowBase" alt="" coords="155,160,285,189"/> <area shape="rect" id="node10" href="wx.EvtHandler.html" title="A class that can handle events from the windowing system." alt="" coords="161,83,279,112"/> <area shape="rect" id="node11" href="wx.Object.html" title="This is the root class of many of the wxWidgets classes." alt="" coords="115,5,203,35"/> <area shape="rect" id="node12" href="wx.Trackable.html" title="Add-on base class for a trackable object." alt="" coords="227,5,338,35"/> <area shape="rect" id="node13" href="wx.ItemContainerImmutable.html" title="wx.ItemContainer  defines an interface which is implemented by all controls which have string subitems each of which may be selected." alt="" coords="293,237,505,267"/> </map> 
   </p>
   </div>

|


|super_classes| Known Superclasses
==================================

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

|


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

================================================================================ ================================================================================
:meth:`~wx.lib.combotreebox.MSWComboTreeBox.NotifyNoItemSelected`                Restore the value copied previously, because the user has
:meth:`~wx.lib.combotreebox.MSWComboTreeBox.OnSelectionChangedInTree`            
:meth:`~wx.lib.combotreebox.MSWComboTreeBox.Popup`                               Extend Popup to store a copy of the current value, so we can
:meth:`~wx.lib.combotreebox.MSWComboTreeBox.SetValue`                            Extend SetValue to also select the text in the
================================================================================ ================================================================================


|


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


.. class:: MSWComboTreeBox(NativeComboTreeBox)

   MSWComboTreeBox adds one piece of functionality as compared to
   NativeComboTreeBox: when the user browses through the tree, the
   ComboTreeBox's text field is continuously updated to show the
   currently selected item in the tree. If the user cancels
   selecting a new item from the tree, e.g. by hitting escape, the
   previous value (the one that was selected before the PopupFrame
   was popped up) is restored.

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

      Restore the value copied previously, because the user has
      not selected a new value.


   .. method:: OnSelectionChangedInTree(self, event)


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

      Extend Popup to store a copy of the current value, so we can
      restore it later (in NotifyNoItemSelected). This is necessary
      because MSWComboTreeBox will change the value as the user
      browses through the items in the popped up tree.


   .. method:: SetValue(self, value)

      Extend SetValue to also select the text in the
      ComboTreeBox's text field.
      
      :param string `value`: set the value and select it