Skip to main content
All docs
V25.2
  • TcxTrackBar.AutoSize Property

    Specifies if the width or height of the track bar editor client area is calculated automatically to display visible UI elements in full.

    Declaration

    property AutoSize; default False;

    Property Value

    Type Default Description
    Boolean False

    Specifies if AutoSize mode is active for the standalone track bar editor:

    False

    Default. You can use Width and Height properties to specify explicit dimensions for the track bar (when used as a standalone editor).

    In this mode, the editor automatically reduces UI element dimensions if all UI elements do not fit into current client area dimensions (if the Properties.AutoSize property is set to True).

    True

    The track bar (used as a standalone editor) automatically adjusts the client area height or width depending on the Properties.Orientation property value:

    • Horizontal Layout (Properties.Orientation is tboHorizontal). The track bar height is adjusted automatically according to the current Width property value. You cannot change the current track bar height manually.

    • Vertical Layout (Properties.Orientation is tboVertical). The track bar width is adjusted automatically according to the current Height property value. You cannot change the current track bar width manually.

    Remarks

    AutoSize, Properties.AutoSize, Properties.Alignment, and Properties.Orientation properties allow you to configure UI element positioning and alignment for the track bar editor.

    You can set the AutoSize property to True to automatically calculate the minimum track bar editor width or height required to display all visible UI elements (tick marks, value labels, the track thumb, etc.) in full.

    Available AutoSize Options

    False
    VCL Editors: AutoSize Mode is Disabled for a Track Bar Editor
    True
    VCL Editors; AutoSize Mode is Enabled for a Track Bar Editor

    UI Element Alignment Options

    You can use the Properties.Alignment property to position track bar elements within the editor client area if the AutoSize property is set to False (default), and the current client area height or width exceeds the minimum size required to display all visible UI elements in full.

    Horizontal Layout

    To position visible UI elements vertically within a horizontally oriented[1] (default) track bar layout, assign the following values to the Properties.Alignment.Vert property:

    taTopJustify

    taBottomJustify

    taVCenter

    VCL Editors: Top-Aligned Track Bar UI Elements in a Horizontally-Oriented Editor

    VCL Editors: Bottom-Aligned Track Bar UI Elements in a Horizontally-Oriented Editor

    VCL Editors: Centered Track Bar UI Elements in a Horizontally-Oriented Editor

    Vertical Layout

    To position visible UI elements horizontally within a vertically oriented[2] (Properties.Orientation is tboVertical) track bar layout, assign the following values to the Properties.Alignment.Horz property:

    taLeftJustify

    taCenter

    taRightJustify

    VCL Editors: Left-Aligned Track Bar UI Elements in a Vertically-Oriented Editor

    VCL Editors: Centered Track Bar UI Elements in a Vertically-Oriented Editor

    VCL Editors: Right-Aligned Track Bar UI Elements in a Vertically-Oriented Editor

    Default Value

    The AutoSize property’s default value is False.

    Footnotes
    1. If the Properties.Orientation property is set to tboHorizontal.

    2. If the Properties.Orientation property is set to tboVertical.

    See Also