.NET
  Home arrow .NET arrow Page 3 - The Why and How of the SplitContainer Cont...
ASP Free Forums 
.NET  
ASP  
ASP Code  
ASP.NET  
ASP.NET Code  
BrainDump  
C#  
Code Examples  
Database  
Database Code  
IIS  
Microsoft Access  
MS SQL Server  
Visual Basic.NET  
Windows Scripting  
Windows Security  
XML  
ASP Web Hosting  
ASP.NET Web Hosting 
Mobile Linux 
App Generation ROI 
Windows Web Hosting
 
IBM® developerWorks 
Sun Developer Network 
Weekly Newsletter
 
Developer Updates  
Free Website Content 
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Write For Us Get Paid 
Request Media Kit
Contact Us 
Site Map 
Privacy Policy 
Support 
 USERNAME
 
 PASSWORD
 
 
  >>> SIGN UP!  
  Lost Password? 
.NET

The Why and How of the SplitContainer Control
By: Jayaram Krishnaswamy
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: 5 stars5 stars5 stars5 stars5 stars / 13
    2006-11-27

    Table of Contents:
  • The Why and How of the SplitContainer Control
  • The two orientations of SplitContainer Controls
  • Docking and Anchoring of Controls
  • Anchoring to prevent obscuring
  • Hide and reveal panels with nested SplitContainers
  • Events related to the SplitContainer Control

  • Rate this Article: Poor Best 
      ADD THIS ARTICLE TO:
      Del.ici.ous Digg
      Blink Simpy
      Google Spurl
      Y! MyWeb Furl
    Email Me Similar Content When Posted
    Add Developer Shed Article Feed To Your Site
    Email Article To Friend
    Print Version Of Article
    PDF Version Of Article
     
     
    ADVERTISEMENT


    The Why and How of the SplitContainer Control - Docking and Anchoring of Controls


    (Page 3 of 6 )

    One of the common properties of controls is the Dock property. This property  shows to which of the four sides the control is docked, or whether it "fills" the parent as shown by the design time "dock" setting, or whether the control is not docked at all. You make these choices by clicking on the appropriate button in the Properties window. The Anchor property on the other hand defines to which edges of a container the control contained therein is bound.

    Since the SplitContainer control is basically related to layout as explained earlier, the dock and anchor properties of the controls it contains in its panels are important. For example when the splitter resizes the panels, depending on whether or not the controls are properly set with regard to "dock" and "anchor," it is possible to make them adjust automatically while resizing the panels, or obscure them.

    Anchored Text boxes in Panels

    While looking at properties it is enough to right click inside the control to review the properties or make changes to the properties. For the SplitContainer right click on any of the panels and from the drop-down choose Select SplitContainer1 to review its properties. In the same drop-down you may also choose the form which is underneath the SplitContainer.

    The setting of the text boxes in the design view of the following form with a SplitContainer shown are as follows:

    Textbox1 in SplitContainer1.Panel1
    Anchor: Top, Left (default)
    Dock None
    Size: 100, 74
    WordWrap: True
    MultiLine: True
    ScrollBars: Vertical

    Textbox2 in SpliterContainer1.Panel2
    Anchor: Top, Right
    Dock None
    Size: 100,82
    WordWrap: True
    MultiLine: True
    ScrollBars :Vertical

    When this project is built and the Docking form is run the form will be displayed as shown with the Splitter dragged to the left.

    When the splitter is dragged to the right, the resizing makes the following change to the display. The obscuring of the text in the text boxes is easy to see.

    More .NET Articles
    More By Jayaram Krishnaswamy


       · This is a nice control to use in your navigation strategy. Also good for displaying...
       · With the splitter control it was possible to place controls like labels on...
     

    .NET ARTICLES

    - Using CrystalReportViewer to Display Crystal...
    - Creating Summary .Net Crystal Reports
    - More on Commands, Input and the WPF
    - Grouping and Aggregating When Querying LINQ ...
    - Commands, Input and the WPF
    - Keyboard and Ink Input with WPF
    - Mouse Input and the WPF
    - Input with Windows Presentation Foundation
    - Introducing LINQ with XML and Databases
    - An Introduction to LINQ
    - Querying LINQ to SQL: Basics
    - Completing a Simple Storefront with LINQ
    - Knowing Your Environment: the System.Environ...
    - Creating the Home Page for a Simple Storefro...
    - LINQ Quickly with Language Integrated Queries

     
    Application Delivery: Everything You Wanted to Know, but Didn`t Know You Needed to Ask
    A comprehensive guide to examining the topics of Wide-area Data Services and app....

     
    Best Practices: Safe and Secure Hardware Asset Recovery
    Companies increasingly must meet EPA and local requirements for the disposal of ....

     
    Managing SSL Security in Multi-Server Environments
    Read this white paper to learn how to simplify management of your organization's....

     
    Open Source Security Myths
    Open Source Software (OSS) is computer software whose source code is available t....

     
    Power and Cooling Capacity Management for Data Centers
    This paper describes the principles for achieving power and cooling capacity man....

     




    © 2003-2008 by Developer Shed. All rights reserved. DS Cluster 5 hosted by Hostway
    Stay green...Green IT