Vcl.ComCtrls.TMonthCalendar.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.ComCtrls.pas
Vcl.ComCtrls.hpp
Vcl.ComCtrls TMonthCalendar

Description

Specifies whether the control can size itself automatically to display a full month.

CanAutoSize is called automatically when the AutoSize property is true and an attempt is made to resize the calendar. It implements the AutoSize property by ensuring that NewWidth and NewHeight represent the width and height required to display a full month.

If the values of NewWidth and NewHeight are adjusted to reflect the size needed to display a month, CanAutoSize returns true. Otherwise, it returns false, aborting the resize attempt.

See Also