Back to Devexpress

TdxZoomTrackBarProperties Class

vcl-dxzoomtrackbar-8d83e307.md

latest12.2 KB
Original Source

TdxZoomTrackBarProperties Class

Stores zoom track bar editor settings.

Declaration

delphi
TdxZoomTrackBarProperties = class(
    TdxCustomZoomTrackBarProperties
)

Remarks

A zoom track bar editor (TdxZoomTrackBar/TdxDBZoomTrackBar) is inspired by a zoom slider found in Microsoft Office® applications. Compared to a simple track bar, a zoom track bar displays two different adjacent track scales for more granular thumb positioning.

You can arrange a zoom track bar editor horizontally or vertically, flip the scale direction, and customize the appearance of scales, thumb, tick marks, and other track bar elements.

End-User Options

Similar to simple track bars, zoom track bar editors (TdxCustomZoomTrackBar descendants) support multiple mouse/touch and keyboard-based user interaction options.

Zoom Track Click & Thumb Drag Operations

Users can drag the thumb to modify the edit value.

In addition, a click on the zoom track bar before or after the thumb changes its position in increments specified by the PageSize property value. If the ThumbStep property is set to cxtsJump, a click on the track bar moves the thumb directly to the target position.

Supported Keystrokes

If the track bar editor has focus, the following keys increment or decrement the edit value (depending on the ReverseDirection property value):

Page Up | Page DownIncrement/decrement the edit value by PageSize.→ | ↑ | ↓ | ← | + | -Increment/decrement the edit value by LineSize. These keys correspond to change buttons.

Mouse Wheel Support

Users can rotate the mouse wheel to increment/decrement[1] the editor value when the following conditions are met:

  • The zoom track bar editor has focus
  • The mouse pointer is within the editor client area
  • The UseMouseWheel property is set to True ( default )

Main API Members

The list below outlines key members of the TdxZoomTrackBarProperties class. These members allow you to configure zoom track bar editors.

Appearance Options

AutoSize

Specifies if track bar UI element dimensions are calculated automatically.

Tip

You need to disable AutoSize to use ThumbHeight, ThumbWidth, and TrackSize properties.

OrientationAllows you to switch between horizontal and vertical track bar layouts.ShowChangeButtons | ShowTicks | ShowTrackSpecify if change buttons, tick marks, and the underlying track bar are visible.TextOrientationAllows you to switch between horizontal and vertical tick label orientation options.ThumbColor | ThumbHeight | ThumbHighlightColor | ThumbType | ThumbWidthAllow you to customize thumb appearance.TickColor | TickMarks | TickTypeAllow you to configure scale/tick mark appearance.TrackColor | TrackSizeSpecify track bar color and width.

User Interaction Options

Automation

Provides access to UI Automation and accessibility-related settings.

Tip

Use Automation.Name, Automation.Description, and other API members to specify information visible to third-party assistive tools as UIA node properties.

ReadOnlyEnables or disables read-only mode. You can use the editor’s Style.ReadOnly and StyleReadOnly properties to customize editor appearance options for the read-only state.ReverseMouseWheel

Specifies if the direction of the mouse wheel rotation is flipped for the track bar editor.

This property is in effect only if the UseMouseWheel property is set to True ( default ).

ShowPositionHintSpecifies if the track bar editor displays a hint that indicates the current thumb position.ThumbStepAllows you to switch between normal and jump thumb positioning modes (applicable when a user clicks the track bar).UseMouseWheelSpecifies if the mouse wheel moves the thumb when the track bar editor has focus and the mouse pointer is within the editor client area.

Zoom Track Bar Scale Settings

FirstRange | SecondRangeAllow you to configure two adjacent zoom track bar scales.FrequencySpecifies the number of track bar scale units between every two tick marks.LineSize | PageSizeSpecify standard ( →, ↑, ↓, ←, +, and - ) and large ( Page Up and Page Down ) thumb position steps.Min | MaxSpecifies minimum and maximum values on the track bar scale.ReverseDirectionAllows you to flip the scale direction. If the scale direction is reversed, corresponding keystrokes ( →, ←, ↓, ↑, etc.) move the thumb in the opposite direction.

Selection Bar Settings

Users can hold the Shift key while moving the thumb to select a range within the track bar.

You can read selected range positions to use corresponding values in your application or select a track bar range in code.

SelectionColorAllows you to modify the selection bar color.SelectionStart | SelectionEndSpecify start and end positions of the selection bar on the track bar scale.

Custom Draw Events

OnDrawThumb | OnGetThumbRectAllow you to override built-in thumb draw routines if the ThumbType property is set to cxttCustom.OnGetTickLabelAllows you to customize the appearance of individual track bar tick marks.

General-Purpose API Members

AssignedValues | RestoreDefaultsAllow you to track the state of individual editor-specific settings and reset them.BeginUpdate | EndUpdate | LockUpdate | DoUpdate | Update | Changed | ChangedLocked | DataChangedAllow you to manage editor updates and avoid excessive redraw operations during batch editor setting changes.

Direct TdxZoomTrackBarProperties Class References

Unbound Zoom Track Bar Editor

TdxZoomTrackBar.ActivePropertiesProvides access to active zoom track bar editor settings.TdxZoomTrackBar.PropertiesProvides access to zoom track bar editor settings.

Data-Aware Zoom Track Bar Editor

TdxDBZoomTrackBar.ActivePropertiesProvides access to active zoom track bar editor settings.TdxDBZoomTrackBar.PropertiesProvides access to zoom track bar editor settings.

To see the TdxZoomTrackBar editor in action, run the Data Editors and Controls demo in the VCL Demo Center installed with compiled DevExpress VCL demos. Click Zoom Track Bar in the sidebar on the left to activate the corresponding demo.

Download: Compiled VCL Demos

Tip

You can find full source code for the installed compiled editor demo in the following folder:

_%PUBLIC%\Documents\DevExpress VCL Demos\MegaDemos\Product Demos\ExpressEditors_

Inheritance

TObject TPersistent TInterfacedPersistent TcxInterfacedPersistent TcxCustomEditProperties TcxCustomTrackBarProperties TdxCustomZoomTrackBarProperties TdxZoomTrackBarProperties

Footnotes

  1. To flip the direction of mouse wheel rotation, you can set the ReverseMouseWheel property to True.

See Also

TdxRangeTrackBarProperties Class

TdxZoomTrackBarProperties Members

dxZoomTrackBar Unit