Back to Devexpress

TcxTrackBar.AutoSize Property

vcl-cxtrackbar-dot-tcxtrackbar-af54651a.md

latest5.8 KB
Original Source

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

delphi
property AutoSize; default False;

Property Value

TypeDefaultDescription
BooleanFalse

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 True

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

| |

|

|

|

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

| |

|

|

|

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

TcxCustomTrackBarProperties.AutoSize Property

TcxTrackBar Class

TcxTrackBar Members

cxTrackBar Unit