[Overview][Constants][Types][Classes][Procedures and functions][Index] |
[Properties (by Name)] [Methods (by Name)] [Events (by Name)]
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.
Source position: comctrls.pp line 1888
type TCustomUpDown = class(TCustomControl) |
||
protected |
||
class procedure WSRegisterClass; override; |
|
Registers this component class with the current WidgetSet. |
procedure AdjustPos(); |
|
Applies changes to the control value using its increment and decrement buttons. |
procedure InitializeWnd; override; |
|
|
procedure AssociateKeyDown(); |
|
AssociateKeyDown - protected procedure for dealing with action to be taken if an associate key (Shift, Ctrl or Alt) is pressed while the control is active. |
procedure AssociateMouseWheel(); |
|
|
procedure OnAssociateChangeBounds(); |
|
OnAssociateChangeBounds - event handler for a change in bounds of the associate control. |
procedure OnAssociateChangeEnabled(); |
|
Event handler signalled when Enabled is changed for the associated control. |
procedure OnAssociateChangeVisible(); |
|
Event handler signalled when Visible is changed for the associated control. |
function DoMouseWheelDown(); override; |
|
Performs actions when a mouse wheel down event occurs for the control. |
function DoMouseWheelUp(); override; |
|
Performs actions when a mouse wheel up event occurs for the control. |
function DoMouseWheelLeft(); override; |
|
Performs actions when a mouse wheel left event occurs for the control. |
function DoMouseWheelRight(); override; |
|
Performs actions when a mouse wheel right event occurs for the control. |
procedure MouseEnter; override; |
|
Performs actions when the mouse pointer enters the control. |
procedure MouseLeave; override; |
|
Performs actions when the mouse pointer leaves the control. |
procedure DoSetBounds(); override; |
|
Applies the specified bounds to the control. |
procedure SetEnabled(); override; |
|
Sets the value for the Enabled property. |
class function GetControlClassDefaultSize; override; |
|
GetControlClassDefaultSize returns its own defaults, overriding inherited values. |
procedure CalculatePreferredSize(); override; |
|
Calculates the preferred width and height for the control. |
function CanChange; virtual; |
|
CanChange - if True, control can be changed. |
procedure Notification(); override; |
|
Notification calls inherited method; if the operation requires removal of the associate control, this is performed. |
procedure Click(); virtual; overload; |
|
Click - calls OnClick event handler if it is assigned. |
property AlignButton: TUDAlignButton; [rw] |
|
AlignButton - how to align the button: left or right. |
property ArrowKeys: Boolean; [rw] |
|
ArrowKeys - if True, the control can be operated by the keyboard's arrow keys which would simulate a click on the Next or Previous button. |
property Associate: TWinControl; [rw] |
|
Associate - the associated control whose properties (controlled variable) are to be changed by the UpDown control. |
property Increment: Integer; [rw] |
|
The amount by which the controlled variable is to be increased or decreased on each click. |
property Max: SmallInt; [rw] |
|
Max - greatest value of controlled variable. |
property Min: SmallInt; [rw] |
|
Min - least value of controlled variable. |
property MinRepeatInterval: Byte; [rw] |
|
Minimum interval that must elapse before the action for the control is repeated. |
property OnChanging: TUDChangingEvent; [rw] |
|
OnChanging - event handler for a change in the value of the controlled variable. |
property OnChangingEx: TUDChangingEventEx; [rw] |
|
Event handler signalled to determine if the control can change its value. |
property OnClick: TUDClickEvent; [rw] |
|
OnClick - special event handler for a click on up or down button. |
property Orientation: TUDOrientation; [rw] |
|
Whether horizontal or vertical. |
property Position: SmallInt; [rw] |
|
The Position of the UpDown control. |
property Thousands: Boolean; [rw] |
|
If True, multiply all displayed values and the Increment by 1000. |
property Flat: Boolean; [rw] |
|
Indicates of the speed buttons for the control are drawn using a flat appearance. |
property Wrap: Boolean; [rw] |
|
If True, displayed control or value starts again from minimum or maximum value if clicking a button would cause incrementing or decrementing beyond the extreme value. |
public |
||
constructor Create(); override; |
|
Create - constructor for TCustomUpDown: calls inherited Create, initializes orientation, max and min, bounds, size and alignment. |
destructor Destroy; override; |
|
Destroy - destructor for TCustomUpDown: removes connection with associate control and calls inherited Destroy. |
end; |
|
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. |
|
| | ||
|
The base class for windowed controls which paint themselves. |
|
| | ||
|
Implements a windowed control which can contain other child controls. |
|
| | ||
|
The base class for visible controls. |
|
| | ||
|
The base class for LCL components which have an associated widget. |
|
| | ||
TComponent |
||
? | ||
TObject |
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.
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.