VB.NET Technology

VB.Net Projects

VB.Net Project 1

Split Container Control
Previous Home Next
adplus-dvertising

This control is an advance window's control or it is an extended version of old splitter control. You can place it at form horizontally or vertically by specifying Orientation property each represents left/top and right/bottom panels respectively.

The SplitContainer control can be thought of as a composite control; effectively it is two Panel controls separated by a movable bar (also known as a splitter bar). When the mouse pointer is over the bar, the pointer changes shape to show that the bar can be moved.

Useful properties

  • AutoScroll: This property when set to true, allows scroll bars to be displayed.

  • BackColor: The background color of the SplitContainer is defaulted to System.Drawing.SystemColors.Control, but this can be set to any color you like. The whole of the SplitContainer changes color, however, each Panel can have its own background color.

  • BackgroundImage: Instead of a single color, an image can be displayed as the background. The image only appears in the splitter bar.

  • BorderStyle: This property determines if the panel is outlined with no visible border (None), a plain line (FixedSingle), or a shadowed line (Fixed3D).

  • Dock: Determines which SplitContainer borders are attached to the edges of the container. When a SplitContainer control is dropped onto a container, this property defaults to Fill.

  • FixedPanel: Determines which SplitContainer panel remains the same size when the container is resized. This property takes a value from the FixedPanel enumeration, the default value is None:

  • None: Specifies that neither SplitContainer.Panel1, SplitContainer.Panel2 is fixed. A Control.Resize event affects both panels.

  • Panel1: Specifies that SplitContainer.Panel1 is fixed. A Control.Resize event affects only SplitContainer.Panel2.

  • Panel2: Specifies that SplitContainer.Panel2 is fixed. A Control.Resize event affects only SplitContainer.Panel1.

  • IsSplitterFixed: Gets or sets a value indicating whether the splitter is fixed or movable.

  • Orientation: Gets or sets a value indicating the Horizontal or Vertical orientation of the SplitContainer panels.

  • Panel1: Gets the left panel of a vertical SplitContainer or the top panel of a horizontal SplitContainer. When you click on this property in the IDE properties pane, you can edit the properties of the underlying Panel.

  • Panel1Collapsed: Determines whether Panel1 is collapsed or expanded. When this value is true, Panel1 is hidden and Panel2 expands to fill the SplitContainer. This property is mutually exclusive with Panel2Collapsed.

  • Panel1MinSize: Determines the minimum distance in pixels of the splitter from the left or top edge of Panel1.

  • Panel2: Gets the right panel of a vertical SplitContainer or the bottom panel of a horizontal SplitContainer. When you click on this property in the IDE properties pane, you can edit the properties of the underlying Panel.

  • Panel2Collapsed: Determines whether Panel2 is collapsed or expanded. When this value is true, Panel2 is hidden and Panel1 expands to fill the SplitContainer. This property is mutually exclusive with Panel1Collapsed.

  • Panel2MinSize: Determines the minimum distance in pixels of the splitter from the right or bottom edge of Panel2.

  • SplitterDistance: Determines the location of the splitter, in pixels, from the left (Orientation = Vertical) or top (Orientation = Horizontal) edge of the SplitContainer.

  • SplitterIncrement: Gets or sets a value representing the increment of splitter movement in pixels.

  • SplitterRectangle: Gets the size and location of the splitter relative to the SplitContainer.

  • SplitterWidth: Determines the width of the splitter in pixels.

Previous Home Next