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

# TUpDown

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

TUpDown - a pair of arrow-like buttons which are used to increment or decrement some controlled variable; often attached to a scroll-bar but can also control a digital numeric display.

## Declaration

Source position: comctrls.pp line 2014

`type TUpDown = class(TCustomUpDown)`
`published`
`property Align: TAlign;` |  | Specifies the placement of the control on its Parent control.
`property AlignButton: TUDAlignButton;` |  | AlignButton - how to align the button: left or right.
`property Anchors: TAnchors;` |  | The set of anchor definitions for this control.
`property ArrowKeys: Boolean;` |  | Enables or disables button clicks when cursor keys are pressed in the Associate control.
`property Associate: TWinControl;` |  | Control used to display and edit the Position for the 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 Enabled: Boolean;` |  | Determines whether the control responds to mouse or keyboard input.
`property Hint: TTranslateString;` |  | The text to show in the Hint window for the control.
`property Increment: Integer;` |  | The amount by which Position is increased or decreased for each button click.
`property Max: SmallInt;` |  | The largest value allowed in the Position property.
`property Min: SmallInt;` |  | The smallest value allowed in the Position property.
`property MinRepeatInterval: Byte;` |  | Minimum interval that must elapse before the action for the control is repeated.
`property Orientation: TUDOrientation;` |  | Indicates the horizontal or vertical orientation for the button(s) displayed on the control.
`property ParentColor: Boolean;` |  | Use the Color from the Parent control, when enabled.
`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: SmallInt;` |  | The current position (or value) for the control as a SmallInt type.
`property ShowHint: Boolean;` |  | Enables Hint display for the control.
`property TabOrder: TTabOrder;` |  | Indicates the navigation order for the control when the user presses the Tab or Shift+Tab key.
`property TabStop: Boolean;` |  | Allows the user to navigate to / from the control by pressing the Tab or Shift+Tab keys.
`property Thousands: Boolean;` |  | Enables or disables use of the thousands separator when displaying the text for the Position property.
`property Flat: Boolean;` |  | Indicates whether the speed buttons for the control are drawn using a flat appearance.
`property Visible: Boolean;` |  | Allows the control, and all of its children, to be displayed or hidden.
`property Wrap: Boolean;` |  | Enables or disables wrap-around for the value in Position when it exceeds the limits in Min or Max.
`property OnChanging: TUDChangingEvent;` |  | Event handler signalled prior to changing the value in the Position property.
`property OnChangingEx: TUDChangingEventEx;` |  | Event handler signalled to determine if the control can change the value in the Position property.
`property OnClick: TUDClickEvent;` |  | Event handler signalled when a button on the control is clicked.
`property OnContextPopup: TContextPopupEvent;` |  | Invoked when a context-sensitive pop-up menu is requested.
`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.
`end;`

## Inheritance

`TUpDown` |  | TUpDown - a pair of arrow-like buttons which are used to increment or decrement some controlled variable; often attached to a scroll-bar but can also control a digital numeric display.
`TCustomUpDown` |  | TCustomUpDown - base class for TUpDown - a pair of arrow-like buttons which are used to increment or decrement some controlled variable; often attached to a scroll-bar but can also control a digital numeric display.
`TCustomControl` |  | The base class for windowed controls which paint themselves.
`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`
?
`TObject`

## Description

TUpDown - a pair of arrow-like buttons which are used to increment or decrement some controlled variable; often attached to a scroll-bar but can also control a digital numeric display

The control definition itself does not specify the variable upon which the buttons operate. The application programmer is responsible for supplying an event handler for OnClick to determine which button has been selected (designated btNext or btPrev) and incrementing or decrementing the variable in the control with which the UpDown is associated.

The amount by which the variable is changed is set by the integer property Increment with the optional multiplier Thousands (a boolean property).

For example the UpDown control may be used to move a slider up and down a scale by a specified amount for each click; alternatively a number may be displayed in a text box and clicking the buttons of the UpDown control may increment or decrement the number displayed by a specified amount.