[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 1389
type TCustomUpDown = class(TCustomControl) |
||
class procedure WSRegisterClass; override; |
|
WSRegisterClass - Register this Class for the current Widget Set |
protected |
||
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 OnAssociateChangeBounds(); |
|
OnAssociateChangeBounds - event handler for a change in bounds of the associate control |
procedure DoOnResize; override; |
|
Calls OnResize |
protected |
||
class function GetControlClassDefaultSize; override; |
|
GetControlClassDefaultSize returns its own defaults, overriding inherited values |
protected |
||
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 Min: SmallInt; [rw] |
|
Min - least value of controlled variable |
property Max: SmallInt; [rw] |
|
Max - greatest value of controlled variable |
|
The amount by which the controlled variable is to be increased or decreased on each click |
|
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 Wrap: Boolean; [rw] |
|
If True, displayed control or value starts again from minimum or maximum value if clicking a button would cause incrementing or decrmenting beyond the extreme value |
property OnChanging: TUDChangingEvent; [rw] |
|
OnChanging - event handler for a change in the value of the controlled variable |
property OnClick: TUDClickEvent; [rw] |
|
OnClick - special event handler for a click on up or down button |
public |
||
constructor Create(); override; |
|
Create - constructor for TCustomUpDown: calls inherited Create, initialises 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 |
|
| | ||
|
TCustomControl - a base class for many window controls |
|
| | ||
| | ||
| | ||
|
TLCLComponent - base class for LCL components |
|
| | ||
| | ||
| | ||
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.
lazarus-ccr.sourceforge.net |