zoukankan      html  css  js  c++  java
  • 默认选中TreeView某个节点的方法

        /// <summary>
        
    /// 选中treeview的某个节点,需要每个node的value不同
        
    /// </summary>
        
    /// <param name="sNodeValue"></param>

        private void checkNode(TreeView tv,string sNodeValue)
        
    {
            
    foreach (TreeNode tRoot in tv.Nodes)
            
    {
                
    if (tRoot.Value == sNodeValue)
                
    {
                    tRoot.Select();
                }

                
    else
                
    {
                    
    if (tRoot.ChildNodes != null)
                    
    {
                        
    foreach (TreeNode tChild in tRoot.ChildNodes)
                        
    {
                            
    if (tChild.Value == sNodeValue)
                                tChild.Select();
                        }

                    }

                }

            }

        }
  • 相关阅读:
    Project项目视图
    Console(控制台视图)
    Layout布局列表
    Layers层列表
    帐户下拉
    TransformGizmo(变换)切换
    Play播放控件
    变换工具
    工具栏
    Help帮助
  • 原文地址:https://www.cnblogs.com/vagerent/p/840512.html
Copyright © 2011-2022 走看看