[Lazarus] Fitting a form around a grid
Mark Morgan Lloyd
markMLl.lazarus at telemetry.co.uk
Thu Jun 16 17:45:27 CEST 2011
Hans-Peter Diettrich wrote:
> Mark Morgan Lloyd schrieb:
>> It's obviously easy enough to fit a grid into the client space of a
>> form or panel, but how does one do the reverse?
>>
>> The exact size of a grid (i.e. such that the outermost grid lines are
>> either displayed or not displayed predictably) depends on the widget
>> set, and possibly on other details such as fount metrics, screen DPI
>> and so on. At present I find myself applying "fudge factors" when
>> shrinking a form to be an exact fit around a grid of a predetermined
>> number of rows and columns, and that's still not entirely reliable
>> when moving between systems.
>>
>> Is there a "correct" way of doing this?
>
> 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?
--
Mark Morgan Lloyd
markMLl .AT. telemetry.co .DOT. uk
[Opinions above are the author's, not those of his employers or colleagues]
More information about the Lazarus
mailing list