本文整理汇总了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);
}
示例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();
}
示例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();
}
示例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;
}
示例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);
}
示例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);
}
示例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 );
}
示例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();
}
示例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;
}
示例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);
}
示例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;
}
示例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);
}
示例13: MainPanel
public MainPanel(Form mainForm)
{
_mainForm = mainForm;
_first = new SplitContainer();
_second = new SplitContainer();
_third = new SplitContainer();
Initialize();
}
示例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);
}
示例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);
}