Inheritance: System.Windows.Forms.TreeView
コード例 #1
0
        public ResourceSelectionControl(ResourceControl resourceControl)
        {
            resourceSplitter = new Splitter( );

            resourceListBox  = new ResourceListBox( );
            resourceTreeView = new ResourceTreeView(resourceListBox);
            resourceListBox.ResourceTreeView = resourceTreeView;

            SuspendLayout( );

            // resourceListBox
            resourceListBox.Size        = new Size(592, 328);
            resourceListBox.Dock        = DockStyle.Fill;
            resourceListBox.TabIndex    = 0;
            resourceListBox.ContextMenu = resourceControl.InternalContextMenu;

            // resourceTreeView
            resourceTreeView.Dock = DockStyle.Left;
            resourceTreeView.Size = new Size(150, 328);

            // resourceSplitter
            resourceSplitter.Dock     = DockStyle.Left;
            resourceSplitter.MinExtra = 150;
            resourceSplitter.MinSize  = 150;

            Controls.Add(resourceListBox);
            Controls.Add(resourceSplitter);
            Controls.Add(resourceTreeView);

            ResumeLayout(false);
        }
コード例 #2
0
        public ResourceSelectionControl( ResourceControl resourceControl )
        {
            resourceSplitter = new Splitter( );

            resourceListBox = new ResourceListBox( );
            resourceTreeView = new ResourceTreeView( resourceListBox );
            resourceListBox.ResourceTreeView = resourceTreeView;

            SuspendLayout( );

            // resourceListBox
            resourceListBox.Size = new Size( 592, 328 );
            resourceListBox.Dock = DockStyle.Fill;
            resourceListBox.TabIndex = 0;
            resourceListBox.ContextMenu = resourceControl.InternalContextMenu;

            // resourceTreeView
            resourceTreeView.Dock = DockStyle.Left;
            resourceTreeView.Size = new Size( 150, 328 );

            // resourceSplitter
            resourceSplitter.Dock = DockStyle.Left;
            resourceSplitter.MinExtra = 150;
            resourceSplitter.MinSize = 150;

            Controls.Add( resourceListBox );
            Controls.Add( resourceSplitter );
            Controls.Add( resourceTreeView );

            ResumeLayout( false );
        }