Difference between revisions of "Autosize / Layout"

From Lazarus wiki
Jump to navigationJump to search
Line 4: Line 4:
  
 
=FAQ=
 
=FAQ=
 +
 +
==Why does AutoSize not work in the designer properly?==
 +
 +
In the designer controls can be dragged around and properties can be set in almost any order. To allow this and avoid possible conflicts, the AutoSizing is not updated on every change at design time.
  
 
==Why does TForm.AutoSize not work when something changes?==
 
==Why does TForm.AutoSize not work when something changes?==

Revision as of 18:23, 3 January 2008

Anchor Sides

See Anchor Sides.

FAQ

Why does AutoSize not work in the designer properly?

In the designer controls can be dragged around and properties can be set in almost any order. To allow this and avoid possible conflicts, the AutoSizing is not updated on every change at design time.

Why does TForm.AutoSize not work when something changes?

TForm.AutoSize only works once at creation time. After that the size is up to user and the windowmanager. The application can force a resize with the following:

 AutoSize:=false; // first reset the counter
 AutoSize:=true;  // then do one AutoSize