.. 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.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="wx.lib.combotreebox.MSWComboTreeBox" alt="" coords="120,547,413,576"/> <area shape="rect" id="node2" href="wx.lib.combotreebox.NativeComboTreeBox.html" title="wx.lib.combotreebox.NativeComboTreeBox" alt="" coords="115,469,419,499"/> <area shape="rect" id="node3" href="wx.lib.combotreebox.BaseComboTreeBox.html" title="wx.lib.combotreebox.BaseComboTreeBox" alt="" coords="5,392,299,421"/> <area shape="rect" id="node4" href="wx.ComboBox.html" title="wx.ComboBox" alt="" coords="323,392,439,421"/> <area shape="rect" id="node5" href="wx.Control.html" title="wx.Control" alt="" coords="186,315,278,344"/> <area shape="rect" id="node6" href="wx.ItemContainer.html" title="wx.ItemContainer" alt="" coords="312,315,451,344"/> <area shape="rect" id="node7" href="wx.TextEntry.html" title="wx.TextEntry" alt="" coords="475,315,581,344"/> <area shape="rect" id="node8" href="wx.Window.html" title="wx.Window" alt="" coords="165,237,262,267"/> <area shape="rect" id="node9" href="wx.WindowBase.html" title="wx.WindowBase" alt="" coords="149,160,278,189"/> <area shape="rect" id="node10" href="wx.EvtHandler.html" title="wx.EvtHandler" alt="" coords="155,83,272,112"/> <area shape="rect" id="node11" href="wx.Object.html" title="wx.Object" alt="" coords="110,5,197,35"/> <area shape="rect" id="node12" href="wx.Trackable.html" title="wx.Trackable" alt="" coords="221,5,328,35"/> <area shape="rect" id="node13" href="wx.ItemContainerImmutable.html" title="wx.ItemContainerImmutable" alt="" coords="286,237,495,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


