RAD Studio VCL Reference
TControl.CanResize Method

OnCanResize event dispatcher.

function CanResize(var NewWidth: Integer; var NewHeight: Integer): Boolean; virtual;
virtual __fastcall Boolean CanResize(int NewWidth, int NewHeight);

CanResize is called automatically when an attempt is made to resize the control, after any autosizing has occurred. The NewWidth and NewHeight arguments specify the attempted new values for the control's height and width. CanResize optionally adjusts the values of NewWidth and NewHeight, and returns true if the control can be resized to the returned values. CanResize returns false if the control cannot be resized. 

CanResize generates an OnCanResize event. An OnCanResize event handler may change the values of NewHeight and NewWidth. 


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