RAD Studio VCL Reference
ContentsIndex
PreviousUpNext
TMonthCalendar.CanAutoSize Method

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

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

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. 

 

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