[Lazarus] Fitting a form around a grid

Hans-Peter Diettrich DrDiettrich1 at aol.com
Fri Jun 17 07:53:03 CEST 2011


Mark Morgan Lloyd schrieb:

>> If you don't want to calculate the exact amount, you can dimension the 
>> form sufficiently big, and adjust the columns to fill the form.
> 
> That's doable for the width, but what about rows where I believe there's 
> less scope for per-row tweaking?

Depends on whether the number of rows is fixed, or only known at 
runtime. I'd adjust for a minimal number of rows, so that the form will 
not "jump" too much in height, with every occurence.

As long as there exist only rows of a single line, it should not be so 
hard to calculate the minimum height of each row, depending on the 
choosen font. Then bitmaps, of a constant height, will be another factor 
to consider. Finally there is a choice of adjusting the row height, so 
that the rows fill the grid, or to shrink the grid to the total rows height.

DoDi





More information about the Lazarus mailing list