Controls > Web Splitter > Advanced

Programmatic Access

This section describes how to access Web Splitter and its associated objects in code-behind.

Namespace

The namespace required by ZeeControls:

using ZettaCube.ZeeControls;

WebSplitterContainer

The WebSplitterContainer class represents containers. E.g.:

WebSplitterContainer1.Orientation = OrientationEnum.Horizontal;
WebSplitterContainer1.FitParent = FitParentEnum.FitWindow;

WebSplitterPanel

The WebSplitterPanel class represents panels.

If a panel has an explicit ID, it can be accessed directly. E.g.:

WebSplitterPanel1.Filled = true;
WebSplitterPanel1.PreferredSize = 150; 

Alternatively, a panel can be accessed via the Panels collection in WebSplitterContainer:

WebSplitterPanel statusPanel = WebSplitterContainer1.Panels[2];
statusPanel.Filled = true;
statusPanel.PreferredSize = 150; 

WebSplitterBarProps

The WebSplitterBarProps class represents the collection of properties of splitter bars. This class corresponds to the SplitterProps property in a Web Splitter. E.g.:

WebSplitterBarProps splitterProps = WebSplitterContainer1.SplitterProps;
splitterProps.BackColor = System.Drawing.Color.DarkGray;
splitterProps.Thickness = 10;
splitterProps.CursorHSplit = "url('custom.cur'), crosshair";
splitterProps.LiveRefresh = true;

Every Web Splitter must have an ID (unique on the page) assigned. IDs for panels are optional. However, you need to assign an ID to a panel if you want to refer to it by ID in the code-behind.