Class
ContentPanel
Usage:
Used to group a series of UI Elements and Controls
ContentPanel
Properties:
- Dock
Variable – Docks the panel to a certain area of the application
Panel1.Dock = top; Panel1.Dock = bottom; Panel1.Dock = left; Panel1.Dock = right; Panel1.Dock = fill; Panel1.Dock = none; // or default;
- AutoSize
Boolean- Sets whether the UI Element should be autosized.
Panel1.AutoSize = true;
- Height
Variable – Sets the vertical height of the panel.
Panel1.Height = 32px;
- Width
Variable – Sets the horizontal length of the panel
Panel1.Width = 32px
- Padding
Variable – Sets the padding for the panel from the main window or container.
Panel1.Padding.Top = 5px; Panel1.Padding.Left = 5px; Panel1.Padding.Right = 5px; Panel1.Padding.Bottom = 5px; Panel1.Padding.All = 5px;
- Anchor
Variable – Anchors the panel relative to a side or multiple sides of the parent container.
Panel1.Anchor = top, left; Panel1.Anchor = bottom, top; Panel1.Anchor = left;
- Contents
Clause – Creates a space to programmatically add contents to the Panel.
Panel1.Contents { //contents go here } Panel1.Contents = new ContentSpace1(); ContentSpace1 { //contents go here }
- Visible
Variable – Determines whether the UI element is visible or not.
Panel1.Visibility = visible; Panel1.Visibility = invisible;
- BorderStyle
Variable – Sets the border style.
Panel1.BorderStyle= Single; Panel1.BorderStyle= 3DSingle; Panel1.BorderStyle= Sizable; Panel1.BorderStyle= Default;
Example:
new ContentPanel = Panel1(); Panel1.Dock = fill; Panel1.Padding.Left = 3px; Panel1.Contents { }