SIGN UP MEMBER LOGIN:    
ARTICLE

Splitter Control in C#

Posted by Mahesh Chand Articles | Windows Controls C# March 06, 2001
This article demonstrates how to use Windows Forms Splitter control using C#.
Reader Level:
Download Files:
 

Note: SplitContainer Control has replaced Splitter control in .NET 2.0 (Visual Studio 2005) or later versions.


Using splitter control in VS.NET Beta 1 IDE is a pain. Its seems there is a bug in Splitter Control. Any way, In this article, I will explain how to write application with splitter control. Just follow few simple steps -

  • Add a List box or any control.
  • Set its Dock property to Left.
  • Add a splitter.
  • Right click on the list box and select Bring to Front.
  • Add a Panel to the Right side of the form.
  • Right Click on it and select Send to Back.

Splitter.jpg

Here is the code added from the splitter control -
this.splitter1 = new System.WinForms.Splitter ();
splitter1.BorderStyle = System.WinForms.BorderStyle.FixedSingle;
splitter1.BackColor = System.Drawing.Color.Red;
splitter1.Location =
new System.Drawing.Point (120, 0);
splitter1.Size =
new System.Drawing.Size (8, 237);
splitter1.TabIndex = 1;
splitter1.TabStop =
false;

See attached project for more details.

share this article :
post comment
 
Become a Sponsor
PREMIUM SPONSORS
  • The leading .NET charting control now features PDF, Flash and Silverlight export, visualization of large datasets and more. Deliver true charting functionality to your BI, Scorecard, Presentation or Scientific apps. Download evaluation now.
    Get 2 Months Free of ASP.NET Hosting for Only $4.95/month! Receive FREE MS SQL and MySQL Databases Including ASP.NET 4/3.5, MVC 3.0, Silverlight 4, Windows 2008/IIS 7.0 Plus FREE IIS 7 Modules. Host UNLIMITED ASP.NET Web Sites - Click Here!
Team Foundation Server Hosting
Become a Sponsor