Skip to main content

TcxCustomTrackBarProperties.SelectionEnd Property

Specifies the position where the selection bar ends.

Declaration

property SelectionEnd: Integer read; write; default 0;

Property Value

Type Default
Integer 0

Remarks

If the track is displayed within the track bar editor (the ShowTrack property value is True), you can display a selection bar within it. The range occupied by the selection bar is specified by the SelectionStart and SelectionEnd property values. The image below shows the relation between the SelectionStart, SelectionEnd, Min, and Max property values.

The selection bar is displayed only when the following conditions are met:

  • The SelectionStart property value is less than the SelectionEnd property value. This means that you can hide the selection bar by setting these properties to the same value;

  • The SelectionStart property value is less than the Max property value;

  • The SelectionEnd property value is greater than the Min property value.

If the SelectionStart property value equals the Min property value and SelectionEnd equals Max, the selection bar occupies the entire track. End-users can adjust the selection by moving the thumb, using the keyboard while holding down the Shift key. Use the SelectionColor property to customize the color of the selection bar.

Tip

You can imitate a progress bar control by hiding the track bar’s thumb and operating with the selection only. The ThumbType property must be set to cxttNone for this purpose.

The default value of the SelectionEnd property is 0.

See Also