.. include:: headings.inc .. currentmodule:: lib.combotreebox .. highlight:: python .. _lib.combotreebox.MSWComboTreeBox: ========================================================================================================================================== |phoenix_title| **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| Inheritance Diagram ===================================== Inheritance diagram for class **MSWComboTreeBox** .. raw:: html

Inheritance diagram of MSWComboTreeBox

| |super_classes| Known Superclasses ================================== :class:`lib.combotreebox.NativeComboTreeBox` | |method_summary| Methods Summary ================================ ================================================================================ ================================================================================ :meth:`~lib.combotreebox.MSWComboTreeBox.NotifyNoItemSelected` Restore the value copied previously, because the user has :meth:`~lib.combotreebox.MSWComboTreeBox.OnSelectionChangedInTree` :meth:`~lib.combotreebox.MSWComboTreeBox.Popup` Extend Popup to store a copy of the current value, so we can :meth:`~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