{------------------------------------------------------------------------------ function TWinControl.AutoSizeDelayed: boolean; ------------------------------------------------------------------------------} function TWinControl.AutoSizeDelayed: boolean; begin Result:=(csDestroyingHandle in ControlState) or (inherited AutoSizeDelayed); end; function TWinControl.AutoSizeDelayedReport: string; begin if csDestroyingHandle in ControlState then Result:='csDestroyingHandle' else Result:=inherited AutoSizeDelayedReport; end; {------------------------------------------------------------------------------ TWinControl AutoSizeDelayedHandle Returns true if AutoSize should be skipped / delayed because of its handle. A TWinControl needs a parent handle. ------------------------------------------------------------------------------} function TWinControl.AutoSizeDelayedHandle: Boolean; begin Result := (Parent = nil) and (ParentWindow = 0); end;