當前位置: 首頁>>代碼示例>>C#>>正文


C# Forms.SplitContainer類代碼示例

本文整理匯總了C#中System.Windows.Forms.SplitContainer的典型用法代碼示例。如果您正苦於以下問題:C# SplitContainer類的具體用法?C# SplitContainer怎麽用?C# SplitContainer使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


SplitContainer類屬於System.Windows.Forms命名空間,在下文中一共展示了SplitContainer類的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C#代碼示例。

示例1: SearchBar

        public SearchBar()
        {
            // Generic properties
            MinimumSize = new Size(0,24);
            Padding = new Padding(3);

            // Create a SplitContainer
            _container = new SplitContainer();
            _container.Dock = DockStyle.Fill;
            _container.FixedPanel = FixedPanel.Panel1;
            _container.IsSplitterFixed = true;
            _container.SplitterDistance = 24;
            Controls.Add(_container);

            // Add the search picture
            _icon = new PictureBox();
            _icon.Image = Icons.Magnifier_icon;
            _icon.AutoSize = false;
            _icon.SizeMode = PictureBoxSizeMode.CenterImage;
            _icon.MinimumSize = _icon.Image.Size;
            _icon.Dock = DockStyle.Fill;
            _container.Panel1.Controls.Add(_icon);

            // Now the search box itself
            _inputField = new TextBox();
            _inputField.BackColor = Color.Pink;
            _inputField.BorderStyle = BorderStyle.None;
            _inputField.Dock = DockStyle.Fill;
            _inputField.BackColor = Color.FromArgb(255, 175, 180, 190);
            _inputField.KeyUp += new KeyEventHandler(_control_KeyUp);
            _container.Panel2.Padding = new Padding(0, 5, 0, 0);
            _container.Panel2.Controls.Add(_inputField);
        }
開發者ID:dowlingw,項目名稱:dasplayer,代碼行數:33,代碼來源:SearchBar.cs

示例2: ResGroupEditor

		public ResGroupEditor(IEditorEnvironment editorEnvironment, ICommandHistory history)
		{
			this.editorEnvironment = editorEnvironment;
			this.history = history;
			this.AutoSize = true;
			this.Padding = new Padding(10);

			this.SuspendLayout();

			this.split = new SplitContainer { Dock = DockStyle.Fill };
			this.split.Panel2Collapsed = true;
			this.Controls.Add(this.split);

			var sp = new StackPanel { Dock = DockStyle.Fill, AutoSize = true };
			this.split.Panel1.Controls.Add(sp);

			var collectionView = new CollectionView<IResourceFile>(a => editorEnvironment.EditorFor(a, history))
				{ AutoSize = true };
			collectionView.ItemsPanel.AutoSize = true;
			collectionView.ItemsPanel.AutoScroll = false;
			new PropertyBinding<ResGroup, IList<IResourceFile>>(collectionView, this.dataContext, m => m.ExternalResources, null);
			sp.Controls.Add(collectionView);

			var embCollectionView = new CollectionView<Managed>(a => this.CreateButtonForResource(a)) { AutoSize = true };
			embCollectionView.ItemsPanel.AutoSize = true;
			embCollectionView.ItemsPanel.AutoScroll = false;
			new PropertyBinding<ResGroup, IList<Managed>>(embCollectionView, this.dataContext, m => m.EmbeddedResources, null);
			sp.Controls.Add(embCollectionView);

			this.ResumeLayout();
			this.PerformLayout();
		}
開發者ID:gleblebedev,項目名稱:toe,代碼行數:32,代碼來源:ResGroupEditor.cs

示例3: InitializeControl

        protected void InitializeControl()
        {
            this.SuspendLayout();
            this.BackColor = Color.White;

            ControlContainer = new SplitContainer();
            ControlContainer.Dock = DockStyle.Fill;

            CollectionBrowser = new RsCollectionBrowser(RsViewEngine.CollectionManager);
            CollectionBrowser.Dock = DockStyle.Fill;
            CollectionBrowser.Size = new System.Drawing.Size(
                        512,
                        CollectionBrowser.Height
                    );

            ListContext = new RsCollectionManagement.RsCollectionMgmtContext(this);

            ItemList = new ListView();
            ItemList.Dock = DockStyle.Fill;
            ItemList.View = View.LargeIcon;
            ItemList.ContextMenu = ListContext;

            this.Controls.Add(ControlContainer);

            ControlContainer.Panel1.Controls.Add(CollectionBrowser);
            ControlContainer.Panel2.Controls.Add(ItemList);

            this.ResumeLayout();

            AssignEventHandlers();
        }
開發者ID:ahalassy,項目名稱:reportsmart,代碼行數:31,代碼來源:RsCollectionManagement.Controls.cs

示例4: SplitContainerTools

        /// <summary>Initializes a new instance of the <see cref="SplitContainerTools"/> class.</summary>
        /// <param name="container">
        /// The <see cref="System.Windows.Forms.SplitContainer"/> to which this instance will be bound.
        /// </param>
        public SplitContainerTools(SplitContainer container)
        {
            split = container;
            _keepFocus = false;
            _showGripper = true;
            _showButtons = SplitContainerButtons.None;
            _panel1Border = false;
            _panel2Border = false;
            _buttons = new SplitContainerButton[] { };
            _tooltip = new ToolTip();

            _splitRectInternal = typeof(SplitContainer).GetField("splitterRect", Reflection.BindingFlags.NonPublic |
                                                                                 Reflection.BindingFlags.GetField |
                                                                                 Reflection.BindingFlags.Instance);

            split.Paint += split_Paint;
            split.MouseDown += split_MouseDown;
            split.MouseUp += split_MouseUp;
            split.MouseClick += split_MouseClick;
            split.MouseMove += split_MouseMove;
            split.MouseLeave += (o, e) => split.Cursor = Cursors.Default;
            split.SplitterMoved += split_SplitterMoved;
            split.SizeChanged += split_Resize;
            split.Disposed += (o, e) => _tooltip.Dispose();

            ((Panel)split.Panel1).ClientSizeChanged += Split_Panel_CollapsedChanged;
            ((Panel)split.Panel2).LocationChanged += Split_Panel_CollapsedChanged;
        }
開發者ID:franzalex,項目名稱:SimpleGui,代碼行數:32,代碼來源:SplitContainerTools.cs

示例5: InitializeComponent

 private void InitializeComponent()
 {
     this.picture = new System.Windows.Forms.PictureBox();
     this.splitContainer1 = new System.Windows.Forms.SplitContainer();
     this.list = new System.Windows.Forms.ListBox();
     ((System.ComponentModel.ISupportInitialize)(this.picture)).BeginInit();
     this.splitContainer1.Panel1.SuspendLayout();
     this.splitContainer1.Panel2.SuspendLayout();
     this.splitContainer1.SuspendLayout();
     this.SuspendLayout();
     //
     // picture
     //
     this.picture.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Center;
     this.picture.Dock = System.Windows.Forms.DockStyle.Fill;
     this.picture.Location = new System.Drawing.Point(0, 0);
     this.picture.Name = "picture";
     this.picture.Size = new System.Drawing.Size(811, 689);
     this.picture.TabIndex = 0;
     this.picture.TabStop = false;
     //
     // splitContainer1
     //
     this.splitContainer1.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D;
     this.splitContainer1.Dock = System.Windows.Forms.DockStyle.Fill;
     this.splitContainer1.Location = new System.Drawing.Point(0, 0);
     this.splitContainer1.Name = "splitContainer1";
     //
     // splitContainer1.Panel1
     //
     this.splitContainer1.Panel1.Controls.Add(this.list);
     //
     // splitContainer1.Panel2
     //
     this.splitContainer1.Panel2.Controls.Add(this.picture);
     this.splitContainer1.Size = new System.Drawing.Size(969, 693);
     this.splitContainer1.SplitterDistance = 150;
     this.splitContainer1.TabIndex = 2;
     //
     // list
     //
     this.list.Dock = System.Windows.Forms.DockStyle.Fill;
     this.list.FormattingEnabled = true;
     this.list.Location = new System.Drawing.Point(0, 0);
     this.list.Name = "list";
     this.list.Size = new System.Drawing.Size(146, 680);
     this.list.TabIndex = 0;
     this.list.SelectedIndexChanged += new System.EventHandler(this.list_SelectedIndexChanged);
     //
     // GdiForm
     //
     this.ClientSize = new System.Drawing.Size(969, 693);
     this.Controls.Add(this.splitContainer1);
     this.Name = "GdiForm";
     ((System.ComponentModel.ISupportInitialize)(this.picture)).EndInit();
     this.splitContainer1.Panel1.ResumeLayout(false);
     this.splitContainer1.Panel2.ResumeLayout(false);
     this.splitContainer1.ResumeLayout(false);
     this.ResumeLayout(false);
 }
開發者ID:Hamsand,項目名稱:Swf2XNA,代碼行數:60,代碼來源:GdiForm.cs

示例6: Form1

        public Form1()
        {
            InitializeComponent();

            this.Text = "SplitContainer 사용하기";

            TreeView treeView = new TreeView();
            ListView listView = new ListView();

            treeView.Dock = DockStyle.Fill;
            listView.Dock = DockStyle.Fill;
            treeView.Nodes.Add("트리 노드1");
            treeView.Nodes.Add("트리 노드2");
            listView.Items.Add("리스트 아이템1");
            listView.Items.Add("리스트 아이템2");

            // 스풀리터 컨트롤 현재 버전(권장)
            SplitContainer splitContainer = new SplitContainer();
            splitContainer.Dock = DockStyle.Fill;
            splitContainer.Panel1MinSize = 30;  // Pane1의 최소 크기 30
            splitContainer.Panel2MinSize = 50;  // Pane2의 최소 크기 50
            splitContainer.SplitterWidth = 1;  // 스플리터 폭을 1으로 설정
            splitContainer.SplitterIncrement = 5;   // 스프리터 이동간격을 5로 설정

            splitContainer.Panel1.Controls.Add(treeView);   //스플리터 왼쪽에 트리뷰
            splitContainer.Panel2.Controls.Add(listView);   // 스플리터 오른쪽에 리스트뷰

            this.Controls.Add(splitContainer);
        }
開發者ID:gawallsibya,項目名稱:BIT_MFC-CShap-DotNet,代碼行數:29,代碼來源:Form1.cs

示例7: MainForm2

        public MainForm2( string title, Form versionDlg )
        {
            // �v���O���X�o�[�̃_�C�A���O�\��
              new ProgressDialog().SetUp( this, false );

              this.VersionDialog = versionDlg;
              this.MainMenu = CreateMainMenu( versionDlg );
              this.SplitContainer = CreateSplitContainer( this.ViewPanel, this.TreePanel );

              // �c�[���o�[�̍쐬
              foreach ( ToolStrip ts in Ctrl.ToolStripRegistry.ToolStrips ) {
            ToolStripContainer.TopToolStripPanel.Controls.Add( ts );
              }

              // _container
              ToolStripContainer.Dock = DockStyle.Fill;
              ToolStripContainer.TopToolStripPanelVisible = true;
              ToolStripContainer.TopToolStripPanel.Controls.Add( this.MainMenu );
              ToolStripContainer.BottomToolStripPanelVisible = true;
              ToolStripContainer.BottomToolStripPanel.Controls.Add( StatusBar );
              ToolStripContainer.ContentPanel.Controls.Add( SplitContainer );

              // this
              this.Controls.Add( ToolStripContainer );

              // ������
              SI.Tasks.Add( this.ViewPanel );
              SI.Tasks.Add( this.TreePanel );
              SI.PushIdlingSelection( SI.DocumentViews, true );  // �G���g���̑I��
              SI.SetupMainForm( this, title );

              // �ݒ�t�@�C���̓ǂݏ���
              SetupFormSettings( this );
        }
開發者ID:hatsunea,項目名稱:KinectSDKBook4CS,代碼行數:34,代碼來源:MainForm2.cs

示例8: Frame

        public Frame()
        {
            WindowState = FormWindowState.Maximized;
            Text = "Bootpad";
            Font = new Font("Anonymous Pro", 10);
            Dock = DockStyle.Fill;

            he = new HtmlEditor();
            wb = new WebBrowser { Dock = DockStyle.Fill, ScriptErrorsSuppressed = false };
            ut = new System.Windows.Forms.Timer { Interval = 5000 };
            ut.Tick += delegate {
                if (changed) {
                    new Thread(new ThreadStart(delegate {
                        wb.DocumentText = he.Text;
                        changed = false;
                    })).Start();
                }
            };

            he.TextChanged += delegate {
                changed = true;
            };

            var sc0 = new SplitContainer { Parent = this, Dock = DockStyle.Fill, SplitterDistance = 100 };
            sc0.Panel1.Controls.Add(he);
            sc0.Panel2.Controls.Add(wb);

            ut.Start();
        }
開發者ID:u89012,項目名稱:Bootpad,代碼行數:29,代碼來源:Frame.cs

示例9: CreateSplitter

        cExtendedControl CreateSplitter(cExtendedControl Ctrl1, cExtendedControl Ctrl2)
        {
            SplitContainer SC = new SplitContainer();

            SC.Anchor = ((System.Windows.Forms.AnchorStyles)(System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
                       | System.Windows.Forms.AnchorStyles.Left
                       | System.Windows.Forms.AnchorStyles.Right);
            SC.BorderStyle = BorderStyle.FixedSingle;
            SC.Orientation = this.Orientation;

            //SC.Panel1.Width =
            Ctrl1.Width = SC.Panel1.Width;

            Ctrl1.Height = SC.Panel1.Height;
            SC.Panel1.Controls.Add(Ctrl1);

            Ctrl2.Width = SC.Panel2.Width;
            Ctrl2.Height = SC.Panel2.Height;
            SC.Panel2.Controls.Add(Ctrl2);

            cExtendedControl ToBeReturned = new cExtendedControl();

            ToBeReturned.Width = SC.Width;
            ToBeReturned.Height = SC.Height;
            ToBeReturned.Controls.Add(SC);
            ToBeReturned.Anchor = ((System.Windows.Forms.AnchorStyles)(System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
                       | System.Windows.Forms.AnchorStyles.Left
                       | System.Windows.Forms.AnchorStyles.Right);

            //ToBeReturned.Controls.Add(SC);
            return ToBeReturned;
        }
開發者ID:cyrenaique,項目名稱:HCSA,代碼行數:32,代碼來源:cDesignerSplitter.cs

示例10: Form1_Load

 private void Form1_Load(object sender, EventArgs e)
 {
     var splitContainer = new SplitContainer();
     splitContainer.Dock = DockStyle.Fill;
     splitContainer.Panel1MinSize = 0;
     splitContainer.SplitterDistance = 0;
     this.Controls.Add(splitContainer);
 }
開發者ID:exKAZUu,項目名稱:SquadKnights,代碼行數:8,代碼來源:Form1.cs

示例11: CreateSplitContainer

 public static SplitContainer CreateSplitContainer( Control viewPanel, Control treePanel )
 {
     SplitContainer split = new SplitContainer();
       split.Dock = DockStyle.Fill;
       split.SplitterDistance = 7 * split.Width / 10;
       split.Panel1.Controls.Add( viewPanel );
       split.Panel2.Controls.Add( treePanel );
       return split;
 }
開發者ID:hatsunea,項目名稱:KinectSDKBook4CS,代碼行數:9,代碼來源:MainForm.cs

示例12: MetaEditor

        /// <summary>
        /// Initializes a new instance of the <see cref="MetaEditor"/> class.
        /// </summary>
        /// <param name="ifp">The ifp.</param>
        /// <param name="split">The split.</param>
        /// <param name="mapx">The mapx.</param>
        /// <remarks></remarks>
        public MetaEditor(IFPIO ifp, SplitContainer split, Map mapx)
        {
            map = mapx;

            ReflexiveContainer tempr = new ReflexiveContainer("Header");
            MakeControls(0, ifp.items, ref tempr);
            Controls = tempr;
            DrawControls(ref split);
        }
開發者ID:nolenfelten,項目名稱:Blam_BSP,代碼行數:16,代碼來源:MetaEditor.cs

示例13: MainPanel

        public MainPanel(Form mainForm)
        {
            _mainForm = mainForm;
            _first = new SplitContainer();
            _second = new SplitContainer();
            _third = new SplitContainer();

            Initialize();
        }
開發者ID:MDSchechtman,項目名稱:Aerotech-Motor-Sizer,代碼行數:9,代碼來源:MainPanel.cs

示例14: MainForm

        /// <summary>
        /// Constructor</summary>
        public MainForm()
        {
            Text = "File Explorer Sample".Localize();

            m_splitContainer = new SplitContainer();
            m_splitContainer.Orientation = Orientation.Vertical;
            m_splitContainer.Dock = DockStyle.Fill;
            Controls.Add(m_splitContainer);
        }
開發者ID:sbambach,項目名稱:ATF,代碼行數:11,代碼來源:MainForm.cs

示例15: InitializeComponent

        private void InitializeComponent()
        {
            this.splitContainerMain = new System.Windows.Forms.SplitContainer();
            this.rtxLogEvent = new System.Windows.Forms.RichTextBox();
            this.dgvResult = new System.Windows.Forms.DataGridView();
            this.splitContainerMain.SuspendLayout();
            ((System.ComponentModel.ISupportInitialize)(this.dgvResult)).BeginInit();
            this.SuspendLayout();
            // 
            // splitContainerMain
            // 
            this.splitContainerMain.Dock = System.Windows.Forms.DockStyle.Fill;
            this.splitContainerMain.FixedPanel = System.Windows.Forms.FixedPanel.Panel1;
            this.splitContainerMain.Location = new System.Drawing.Point(0, 0);
            this.splitContainerMain.Name = "splitContainerMain";
            this.splitContainerMain.Orientation = System.Windows.Forms.Orientation.Horizontal;
            this.splitContainerMain.Panel1MinSize = 150;
            this.splitContainerMain.Panel2MinSize = 100;
            this.splitContainerMain.Size = new System.Drawing.Size(150, 254);
            this.splitContainerMain.SplitterDistance = 150;
            this.splitContainerMain.TabIndex = 0;
            // 
            // rtxLogEvent
            // 
            this.rtxLogEvent.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
            this.rtxLogEvent.Dock = System.Windows.Forms.DockStyle.Fill;
            this.rtxLogEvent.Location = new System.Drawing.Point(0, 0);
            this.rtxLogEvent.Name = "rtxLogEvent";
            this.rtxLogEvent.Size = new System.Drawing.Size(100, 96);
            this.rtxLogEvent.TabIndex = 0;
            this.rtxLogEvent.Text = "";
            this.rtxLogEvent.TextChanged += new System.EventHandler(this.rtxLogEvent_TextChanged);
            // 
            // dgvResult
            // 
            this.dgvResult.AllowUserToDeleteRows = false;
            this.dgvResult.AllowUserToResizeRows = false;
            //this.dgvResult.AutoSizeColumnsMode = System.Windows.Forms.DataGridViewAutoSizeColumnsMode.Fill;
            this.dgvResult.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
            this.dgvResult.Dock = System.Windows.Forms.DockStyle.Fill;
            this.dgvResult.Location = new System.Drawing.Point(0, 0);
            this.dgvResult.Name = "dgvResult";
            this.dgvResult.ReadOnly = true;
            this.dgvResult.RowTemplate.Height = 23;
            //this.dgvResult.ScrollBars = System.Windows.Forms.ScrollBars.Vertical;
            this.dgvResult.Size = new System.Drawing.Size(240, 150);
            this.dgvResult.TabIndex = 0;
            this.splitContainerMain.ResumeLayout(false);
            ((System.ComponentModel.ISupportInitialize)(this.dgvResult)).EndInit();
            this.ResumeLayout(false);
            this.dgvResult.RowsAdded += new DataGridViewRowsAddedEventHandler(dgvResult_RowsAdded);

            this.splitContainerMain.Panel1.Controls.Add(dgvResult);
            this.splitContainerMain.Panel2.Controls.Add(rtxLogEvent);
            this.Controls.Add(splitContainerMain);
        }
開發者ID:qcjxberin,項目名稱:SmartSpider,代碼行數:56,代碼來源:TaskResultLog.cs


注:本文中的System.Windows.Forms.SplitContainer類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。