[Overview][Constants][Types][Classes][Procedures and functions][Index] Reference for unit 'ComCtrls' (#lcl)

TTrackBar

[Properties (by Name)] [Methods (by Name)] [Events (by Name)]

TTrackBar: a device which allows the user to determine the value of a variable using a quasi-analog slider.

Declaration

Source position: comctrls.pp line 2785

type TTrackBar = class(TCustomTrackBar)

published

  property Align: TAlign;

  

Specifies the placement of the control on its Parent control.

  property Anchors: TAnchors;

  

The set of anchor definitions for this control.

  property BorderSpacing: TControlBorderSpacing;

  

Determines the inner and outer border spacing for this control.

  property Color: TColor;

  

The background color for the control.

  property Constraints: TSizeConstraints;

  

Contains the minimum and maximum Width and Height for the control.

  property DragCursor: TCursor;

  

The cursor shape shown during a drag operation.

  property DragMode: TDragMode;

  

Determines how a drag operation is started for the control.

  property Enabled: Boolean;

  

Determines whether the control responds to mouse or keyboard input.

  property Font: TFont;

  

The font to be used for text display in this control.

  property Frequency: Integer;

  

Indicates the frequency for the tick marks displayed on the control.

  property Hint: TTranslateString;

  

The text to show in the Hint window for the control.

  property LineSize: Integer;

  

Increment (or decrement) applied to the slider position when an arrow key is pressed.

  property Max: Integer;

  

Maximum value allowed in the Position for the track bar.

  property Min: Integer;

  

Minimum value allowed in the Position for the track bar.

  property OnChange: TNotifyEvent;

  

Event handler signalled when the Position in the control has been changed.

  property OnChangeBounds: TNotifyEvent;

  

Event handler signalled when the Bounds for the control have been changed.

  property OnClick: TNotifyEvent;

  

Notification handler for mouse clicks.

  property OnContextPopup: TContextPopupEvent;

  

Invoked when a context-sensitive pop-up menu is requested.

  property OnDragDrop: TDragDropEvent;

  

Event handler signalled when an object is dropped onto the control.

  property OnDragOver: TDragOverEvent;

  

Event handler signalled when a control is dragged over the control instance.

  property OnEndDrag: TEndDragEvent;

  

Event handler signalled for the end of a drag-drop operation.

  property OnEnter: TNotifyEvent;

  

Event handler signalled when the control receives focus.

  property OnExit: TNotifyEvent;

  

Event handler signalled when the control loses focus.

  property OnMouseDown: TMouseEvent;

  

Event handler signalled when a mouse down event is handled for the control.

  property OnMouseEnter: TNotifyEvent;

  

Event handler signalled when the mouse pointer has entered the control.

  property OnMouseLeave: TNotifyEvent;

  

Event handler signalled when the mouse pointer has left the control.

  property OnMouseMove: TMouseMoveEvent;

  

Event handler signalled when the mouse pointer is moved in the control.

  property OnMouseUp: TMouseEvent;

  

Event handler signalled when a mouse up event is handled for the control.

  property OnMouseWheel: TMouseWheelEvent;

  

Event handler for mouse wheel turned.

  property OnMouseWheelDown: TMouseWheelUpDownEvent;

  

Event handler signalled for a downward movement of the mouse wheel.

  property OnMouseWheelUp: TMouseWheelUpDownEvent;

  

Event handler signalled for an upward movement of the mouse wheel.

  property OnMouseWheelHorz: TMouseWheelEvent;

  

Event handler signalled for a horizontal movement of the mouse wheel.

  property OnMouseWheelLeft: TMouseWheelUpDownEvent;

  

Event handler signalled for a leftward movement of the mouse wheel.

  property OnMouseWheelRight: TMouseWheelUpDownEvent;

  

Event handler signalled for a rightward movement of the mouse wheel.

  property OnKeyDown: TKeyEvent;

  

Event handler signalled for key down keyboard events.

  property OnKeyPress: TKeyPressEvent;

  

Event handler signalled for character data entered by the user.

  property OnKeyUp: TKeyEvent;

  

Event handler signalled when a key up event has occurred for the control.

  property OnResize: TNotifyEvent;

  

Notification handler for a resize of the control.

  property OnStartDrag: TStartDragEvent;

  

Event handler signalled for the start of a dragging operation.

  property OnUTF8KeyPress: TUTF8KeyPressEvent;

  

Handler for a character entered by the user.

  property Orientation: TTrackBarOrientation;

  

Indicates the horizontal or vertical orientation for the track bar control.

  property PageSize: Integer;

  

The increment (or decrement) applied to the slider Position when the PageUp or PageDown key is pressed.

  property ParentColor: Boolean;

  

Use the Color from the Parent control, when enabled.

  property ParentFont: Boolean;

  

Indicates if the Font from the Parent control is used in the control.

  property ParentShowHint: Boolean;

  

If True, the value of ShowHint for the control will be the same as the one from the Parent. Default is True.

  property PopupMenu: TPopupMenu;

  

A context-sensitive menu that pops up when the right mouse button is clicked over this control.

  property Position: Integer;

  

Location of the slider on the track bar between the Min and Max values.

  property Reversed: Boolean;

  

Set to True to display values on the track bar in reverse order.

  property ScalePos: TTrackBarScalePos;

  

Position where the scale is displayed for the track bar control.

  property SelEnd: Integer;

  

Ending value for the selection range on the track bar control.

  property SelStart: Integer;

  

Starting value for the selection range on the track bar control.

  property ShowHint: Boolean;

  

Enables Hint display for the control.

  property ShowSelRange: Boolean;

  

Enables or disables a highlighted selection range with tick marks using the values in SelStart and SelEnd.

  property TabOrder: TTabOrder;

  

Indicates the navigation order for the control when the user presses the Tab or Shift+Tab key.

  property TabStop: Boolean;

  

Enables or disables navigation using the Tab key.

  property TickMarks: TTickMark;

  

Position for the tick marks relative to the slider in the track bar.

  property TickStyle: TTickStyle;

  

Indicates the tick mark drawing style for the control.

  property Visible: Boolean;

  

Allows the control, and all of its children, to be displayed or hidden.

end;

Inheritance

TTrackBar

  

TTrackBar: a device which allows the user to determine the value of a variable using a quasi-analog slider.

|

TCustomTrackBar

  

TCustomTrackBar - the base class for TTrackBar.

|

TWinControl

  

Implements a windowed control which can contain other child controls.

|

TControl

  

The base class for visible controls.

|

TLCLComponent

  

The base class for LCL components which have an associated widget.

|

TComponent,IUnknown,IInterfaceComponentReference

|

TPersistent,IFPObserved

|

TObject

Description

TTrackBar: a device which allows the user to determine the value of a variable using a quasi-analog slider.

The device looks like a slider-potentiometer control on a hi-fi amplifier and consists of a slider which can be moved along a bar using the mouse. Tick marks can be displayed along one or both edges, giving an indication of the proportion of the maximum value of the controlled variable that is being selected.

The Position property indicates the distance along the bar that the slider has been placed, either by the program or by mouse capture and movement.

In the example, movement of the slider is detected and shown in the associated TProgressBar.

See also

TCustomTrackBar

  

TCustomTrackBar - the base class for TTrackBar.

How To Use Standard Controls

  

How to use StdCtrls, ComCtrls or ExtCtrls.

Example

 
procedure TForm1.TrackBar1Change(Sender: TObject);
begin
  ProgressBar1.Position := (TrackBar1.Position)*10
end;

Version 3.2 Generated 2024-02-25 Home