Esempio n. 1
0
        /// <summary>
        /// Select the specified menu item in the tree.
        /// </summary>
        /// <param name="item"></param>
        /// <param name="popupTree"></param>
        protected void SelectChosenItem(TreeNode item, PopupTree popupTree)
        {
            CheckDisposed();

            if (item != null)
            {
                // We do NOT want to simulate a mouse click because that will cause the
                // text box in the combo to be focused. We may be updating this from a PropChanged
                // that should not set focus.
                popupTree.SelectByAction = TreeViewAction.Unknown;
                popupTree.SelectedNode   = item;
                if (m_treeCombo != null)
                {
                    m_treeCombo.SetComboText(item);
                }
            }
        }