RAD Studio VCL Reference
ContentsIndex
PreviousUpNext
TWinControl.CanResize Method

Indicates how the control can respond to a resize attempt.

Pascal
function CanResize(var NewWidth: Integer; var NewHeight: Integer): Boolean; override;
C++
virtual __fastcall Boolean CanResize(int NewWidth, int NewHeight);

CanResize is called automatically when an attempt is made to resize the control. The NewWidth and NewHeight parameters specify the attempted new values for the control's height and width. CanResize returns true if the control can be resized to the returned values of NewWidth and NewHeight. CanResize returns false if the control can't 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!