Vcl.ExtCtrls.TCustomControlBar.CanAutoSize

From RAD Studio API Documentation
Jump to: navigation, search

Delphi

function CanAutoSize(var NewWidth, NewHeight: Integer): Boolean; override;

C++

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

Properties

Type Visibility Source Unit Parent
function protected
Vcl.ExtCtrls.pas
Vcl.ExtCtrls.hpp
Vcl.ExtCtrls TCustomControlBar

Description

Specifies whether the control bar can size itself to accommodate its contents.

CanAutoSize is called automatically when the AutoSize property is True and an attempt to resize the control is made to resize the control. It allows controls to implement the AutoSize property before the resize sequence. This sequence begins with the OnCanResize and OnConstrainedResize events and ends with the OnResize event. When CanAutoSize is called, the NewWidth and NewHeight parameters indicate the proposed new dimensions of the control bar. CanAutoSize adjusts these values so that the control bar’s bands are all visible. CanAutoSize returns True, indicating that the resize sequence should proceed.

See Also