Vcl.ComCtrls.TCustomUpDown.DoCanChange

From RAD Studio API Documentation
Jump to: navigation, search

Delphi

function DoCanChange(NewVal: Integer; Delta: Integer): Boolean;

C++

bool __fastcall DoCanChange(int NewVal, int Delta);

Properties

Type Visibility Source Unit Parent
function protected
Vcl.ComCtrls.pas
Vcl.ComCtrls.hpp
Vcl.ComCtrls TCustomUpDown

Description

Pending change event dispatcher.

DoCanChange is called automatically when the user clicks the arrow buttons or an attempt is made to change the value of Position programmatically. DoCanChange stores the value of the NewVal and Delta parameters and then calls CanChange to generate an OnChanging event followed by an OnChangingEx event. It allows the change to position unless an OnChanging or OnChangingEx event handler prevents it.

NewVal specifies the proposed new value of Position if the change is allowed.

Delta indicates the size of the change, where positive values increase Position and negative values decrease Position.

DoCanChange returns true if the change is allowed, false otherwise.

See Also