public Form1()
        {
            InitializeComponent();
 
            showControls (treeView1.Nodes, this);
        }
 
        void showControls (TreeNodeCollection target,
                           Control control)
        {
            TreeNode node = new TreeNode ();
            node.Text = control.Name + ":" + 
                        control.GetType().Name;
            node.Tag = control;
            target.Add (node);
            foreach (Control c in control.Controls)
                showControls (node.Nodes, c);
        }
 
        private void treeView1_AfterSelect(object sender, TreeViewEventArgs e)
        {
            propertyGrid1.SelectedObject = e.Node.Tag;
        }
 
properties.txt · Last modified: 2014/12/08 14:49 by 147.32.8.115
 
Recent changes RSS feed Creative Commons License Donate Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki