Vcl.Controls.TControl.CanResize

From RAD Studio API Documentation
Jump to: navigation, search

Delphi

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

C++

virtual bool __fastcall CanResize(int &NewWidth, int &NewHeight);

Properties

Type Visibility Source Unit Parent
function protected
Vcl.Controls.pas
Vcl.Controls.hpp
Vcl.Controls TControl

Description

OnCanResize event dispatcher.

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.

See Also