new SplitContainer() : SplitContainer « System.Windows.Forms « C# / C Sharp by API

Home
C# / C Sharp by API
1.Microsoft.Win32
2.System
3.System.Collections
4.System.Collections.Generic
5.System.Collections.Specialized
6.System.ComponentModel
7.System.Configuration
8.System.Data
9.System.Data.Common
10.System.Data.Linq
11.System.Data.Odbc
12.System.Data.OleDb
13.System.Data.Sql
14.System.Data.SqlClient
15.System.Diagnostics
16.System.DirectoryServices
17.System.Drawing
18.System.Drawing.Drawing2D
19.System.Drawing.Imaging
20.System.Drawing.Printing
21.System.Drawing.Text
22.System.EnterpriseServices
23.System.Globalization
24.System.IO
25.System.IO.Compression
26.System.IO.IsolatedStorage
27.System.IO.Ports
28.System.Linq
29.System.Management
30.System.Media
31.System.Messaging
32.System.Net
33.System.Net.Mail
34.System.Net.NetworkInformation
35.System.Net.Sockets
36.System.Reflection
37.System.Resources
38.System.Runtime
39.System.Runtime.CompilerServices
40.System.Runtime.InteropServices
41.System.Runtime.Remoting
42.System.Runtime.Remoting.Channels
43.System.Runtime.Remoting.Channels.Http
44.System.Runtime.Remoting.Messaging
45.System.Runtime.Serialization
46.System.Runtime.Serialization.Formatters.Binary
47.System.Runtime.Serialization.Formatters.Soap
48.System.Security
49.System.Security.AccessControl
50.System.Security.Cryptography
51.System.Security.Cryptography.X509Certificates
52.System.Security.Permissions
53.System.Security.Policy
54.System.Security.Principal
55.System.ServiceProcess
56.System.Text
57.System.Text.RegularExpressions
58.System.Threading
59.System.Timers
60.System.Web.Security
61.System.Web.Services
62.System.Windows.Controls
63.System.Windows.Forms
64.System.Xml
65.System.Xml.Linq
66.System.Xml.Schema
67.System.Xml.Serialization
68.System.Xml.XPath
69.System.Xml.Xsl
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
C# / C Sharp by API » System.Windows.Forms » SplitContainer 
new SplitContainer()
 

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;

public class Form1 : Form
{

  private System.Windows.Forms.SplitContainer splitContainer1;
  private System.Windows.Forms.SplitContainer splitContainer2;
  private System.Windows.Forms.WebBrowser webBrowser1;
  private System.Windows.Forms.TextBox TextBox1;
  private System.Windows.Forms.Panel pnlFileList;
  private System.Windows.Forms.Button cmdHide;
  private System.Windows.Forms.ListView ListView1;
  private System.Windows.Forms.ColumnHeader ColumnHeader1;
  private System.Windows.Forms.Panel pnlShow;
  private System.Windows.Forms.Button cmdShow;
  public Form1() {
        InitializeComponent();
        ListView1.Items.Add("A");
        ListView1.Items.Add("B");
        ListView1.Items.Add("C");
  }
  private void cmdHide_Click(object sender, EventArgs e)
  {
    splitContainer1.Panel1Collapsed = true;
    pnlShow.Visible = true;

  }

  private void cmdShow_Click(object sender, EventArgs e)
  {
    splitContainer1.Panel1Collapsed = false;
    pnlShow.Visible = false;
    

  }

  private void InitializeComponent()
  {
        this.splitContainer1 = new System.Windows.Forms.SplitContainer();
        this.pnlFileList = new System.Windows.Forms.Panel();
        this.cmdHide = new System.Windows.Forms.Button();
        this.ListView1 = new System.Windows.Forms.ListView();
        this.ColumnHeader1 = new System.Windows.Forms.ColumnHeader();
        this.splitContainer2 = new System.Windows.Forms.SplitContainer();
        this.webBrowser1 = new System.Windows.Forms.WebBrowser();
        this.TextBox1 = new System.Windows.Forms.TextBox();
        this.pnlShow = new System.Windows.Forms.Panel();
        this.cmdShow = new System.Windows.Forms.Button();
        this.splitContainer1.Panel1.SuspendLayout();
        this.splitContainer1.Panel2.SuspendLayout();
        this.splitContainer1.SuspendLayout();
        this.pnlFileList.SuspendLayout();
        this.splitContainer2.Panel1.SuspendLayout();
        this.splitContainer2.Panel2.SuspendLayout();
        this.splitContainer2.SuspendLayout();
        this.pnlShow.SuspendLayout();
        this.SuspendLayout();
        // 
        // splitContainer1
        // 
        this.splitContainer1.Dock = System.Windows.Forms.DockStyle.Fill;
        this.splitContainer1.Location = new System.Drawing.Point(2910);
        this.splitContainer1.Name = "splitContainer1";
        // 
        // splitContainer1.Panel1
        // 
        this.splitContainer1.Panel1.Controls.Add(this.pnlFileList);
        this.splitContainer1.Panel1MinSize = 50;
        // 
        // splitContainer1.Panel2
        // 
        this.splitContainer1.Panel2.Controls.Add(this.splitContainer2);
        this.splitContainer1.Size = new System.Drawing.Size(477366);
        this.splitContainer1.SplitterDistance = 155;
        this.splitContainer1.TabIndex = 0;
        this.splitContainer1.Text = "splitContainer1";
        // 
        // pnlFileList
        // 
        this.pnlFileList.Controls.Add(this.cmdHide);
        this.pnlFileList.Controls.Add(this.ListView1);
        this.pnlFileList.Dock = System.Windows.Forms.DockStyle.Fill;
        this.pnlFileList.Location = new System.Drawing.Point(00);
        this.pnlFileList.Name = "pnlFileList";
        this.pnlFileList.Padding = new System.Windows.Forms.Padding(0010);
        this.pnlFileList.Size = new System.Drawing.Size(155366);
        this.pnlFileList.TabIndex = 21;
        // 
        // cmdHide
        // 
        this.cmdHide.Dock = System.Windows.Forms.DockStyle.Bottom;
        this.cmdHide.FlatStyle = System.Windows.Forms.FlatStyle.System;
        this.cmdHide.Location = new System.Drawing.Point(0346);
        this.cmdHide.Name = "cmdHide";
        this.cmdHide.Size = new System.Drawing.Size(15420);
        this.cmdHide.TabIndex = 23;
        this.cmdHide.Text = "<< Hide";
        this.cmdHide.Click += new System.EventHandler(this.cmdHide_Click);
        // 
        // ListView1
        // 
        this.ListView1.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)));
        this.ListView1.Columns.AddRange(new System.Windows.Forms.ColumnHeader[] {
        this.ColumnHeader1});
        this.ListView1.Location = new System.Drawing.Point(03);
        this.ListView1.Name = "ListView1";
        this.ListView1.Size = new System.Drawing.Size(152337);
        this.ListView1.TabIndex = 22;
        this.ListView1.UseCompatibleStateImageBehavior = false;
        this.ListView1.View = System.Windows.Forms.View.Details;
        // 
        // ColumnHeader1
        // 
        this.ColumnHeader1.Name = "ColumnHeader1";
        this.ColumnHeader1.Text = "File";
        this.ColumnHeader1.Width = 99;
        // 
        // splitContainer2
        // 
        this.splitContainer2.Dock = System.Windows.Forms.DockStyle.Fill;
        this.splitContainer2.Location = new System.Drawing.Point(00);
        this.splitContainer2.Name = "splitContainer2";
        this.splitContainer2.Orientation = System.Windows.Forms.Orientation.Horizontal;
        // 
        // splitContainer2.Panel1
        // 
        this.splitContainer2.Panel1.Controls.Add(this.webBrowser1);
        // 
        // splitContainer2.Panel2
        // 
        this.splitContainer2.Panel2.Controls.Add(this.TextBox1);
        this.splitContainer2.Size = new System.Drawing.Size(318366);
        this.splitContainer2.SplitterDistance = 173;
        this.splitContainer2.TabIndex = 0;
        this.splitContainer2.Text = "splitContainer2";
        // 
        // webBrowser1
        // 
        this.webBrowser1.Dock = System.Windows.Forms.DockStyle.Fill;
        this.webBrowser1.Location = new System.Drawing.Point(00);
        this.webBrowser1.Name = "webBrowser1";
        this.webBrowser1.Size = new System.Drawing.Size(318173);
        this.webBrowser1.TabIndex = 0;
        // 
        // TextBox1
        // 
        this.TextBox1.Dock = System.Windows.Forms.DockStyle.Fill;
        this.TextBox1.Location = new System.Drawing.Point(00);
        this.TextBox1.Multiline = true;
        this.TextBox1.Name = "TextBox1";
        this.TextBox1.ReadOnly = true;
        this.TextBox1.ScrollBars = System.Windows.Forms.ScrollBars.Vertical;
        this.TextBox1.Size = new System.Drawing.Size(318189);
        this.TextBox1.TabIndex = 1;
        // 
        // pnlShow
        // 
        this.pnlShow.Controls.Add(this.cmdShow);
        this.pnlShow.Dock = System.Windows.Forms.DockStyle.Left;
        this.pnlShow.Location = new System.Drawing.Point(1010);
        this.pnlShow.Name = "pnlShow";
        this.pnlShow.Padding = new System.Windows.Forms.Padding(0030);
        this.pnlShow.Size = new System.Drawing.Size(19366);
        this.pnlShow.TabIndex = 23;
        this.pnlShow.Visible = false;
        // 
        // cmdShow
        // 
        this.cmdShow.Dock = System.Windows.Forms.DockStyle.Fill;
        this.cmdShow.FlatStyle = System.Windows.Forms.FlatStyle.System;
        this.cmdShow.Font = new System.Drawing.Font("Tahoma"8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
        this.cmdShow.Location = new System.Drawing.Point(00);
        this.cmdShow.Name = "cmdShow";
        this.cmdShow.Size = new System.Drawing.Size(16366);
        this.cmdShow.TabIndex = 21;
        this.cmdShow.Text = ">";
        this.cmdShow.Click += new System.EventHandler(this.cmdShow_Click);
        // 
        // Form1
        // 
        this.AutoScaleDimensions = new System.Drawing.SizeF(6F13F);
        this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
        this.ClientSize = new System.Drawing.Size(516386);
        this.Controls.Add(this.splitContainer1);
        this.Controls.Add(this.pnlShow);
        this.Font = new System.Drawing.Font("Tahoma"8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
        this.Name = "Form1";
        this.Padding = new System.Windows.Forms.Padding(10);
        this.Text = "Split Window";
        this.splitContainer1.Panel1.ResumeLayout(false);
        this.splitContainer1.Panel2.ResumeLayout(false);
        this.splitContainer1.ResumeLayout(false);
        this.pnlFileList.ResumeLayout(false);
        this.splitContainer2.Panel1.ResumeLayout(false);
        this.splitContainer2.Panel2.ResumeLayout(false);
        this.splitContainer2.Panel2.PerformLayout();
        this.splitContainer2.ResumeLayout(false);
        this.pnlShow.ResumeLayout(false);
        this.ResumeLayout(false);

  }

  [STAThread]
  static void Main()
  {
    Application.EnableVisualStyles();
    Application.Run(new Form1());
  }

}

   
  
Related examples in the same category
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.