RAD Studio VCL Reference
ContentsIndex
PreviousUpNext
TCustomUpDown.DoCanChange Method

Pending change event dispatcher.

Pascal
function DoCanChange(NewVal: SmallInt; Delta: SmallInt): Boolean;
C++
__fastcall Boolean DoCanChange(SmallInt NewVal, SmallInt Delta);

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. 

 

Copyright(C) 2009 Embarcadero Technologies, Inc. All Rights Reserved.
What do you think about this topic? Send feedback!