Skip to main content
Version: 2025

XSalToolbox

Namespace: PPJ.Runtime.XSal

Assembly: PPJ.Web.XSal.50 (5.0.0.0)

Hosts controls in a named toolbox that docks into the XSal toolbar strips of a form.

public class XSalToolbox : SalDialogBox

The named template supplied to Create must resolve to a class derived from XSalToolbox.

Example:

SalForm form = new SalForm();
XSalToolbox toolbox = XSalToolbox.Create(
"MyToolbox", form, XSal.ToolboxPositions.Top, XSal.ToolboxFlags.Visible);

Constructors

Instance member XSalToolbox()

Initializes a toolbox dialog.

Properties

Instance member Position

ToolboxPositions: Gets the parent toolbar’s docking position, or moves the toolbox to a specified edge toolbar.

Top, Right, Bottom, and Left are supported assignments. None and other values do not detach or float the toolbox.

Methods

Static member Create(name, form, position, flags)

Initializes a form’s toolbar system and creates a named toolbox template as a child.

ParameterTypeDescription
nameStringThe toolbox template class name.
formFormThe parent form.
positionToolboxPositionsThe toolbar edge where the toolbox is docked.
flagsToolboxFlagsToolbox flags; Visible determines its initial visibility.

Returns: XSalToolbox. The new toolbox, or null if the named window cannot be created.

Throws:

Static member FromHandle(handle)

Resolves a control handle and casts it to XSalToolbox.

ParameterTypeDescription
handleSalWindowHandleThe toolbox window handle.

Returns: XSalToolbox. The toolbox, or null if the handle resolves to no control.

Static member FromName(form, name)

Finds a toolbox by its exact control name among the form’s docked and floating toolboxes.

ParameterTypeDescription
formFormThe containing form, or null.
nameStringThe case-sensitive toolbox name.

Returns: XSalToolbox. The first matching toolbox, or null when the form, toolbar system, or named toolbox is absent.

Static member GetMetrics(type)

Gets a shared toolbar size or child-layout offset.

ParameterTypeDescription
typeToolbarMetricsHeight, Width, LeftOffset, or TopOffset.

Returns: Int32. The metric in pixels, or zero for an unsupported metric.

Protected member LayoutChildren()

Arranges toolbox children after a docking-position change.

The current implementation uses horizontal child layout for all four docking edges.

Static member SetMetrics(value, type)

Sets a shared toolbar size or child-layout offset.

ParameterTypeDescription
valueInt32The metric value in pixels.
typeToolbarMetricsHeight, Width, LeftOffset, or TopOffset. Other values are ignored.

Implements

NameDescription
ISalWindow