Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Auto resizing of components at design time

1 view
Skip to first unread message

Andrew jackson

unread,
Dec 11, 1996, 3:00:00 AM12/11/96
to

I've been looking at the Resource Explorer example application that comes
with Delphi 2.01. It seems that if you resize the main form at design
time, the other components on the form (a tree view, list view etc) are
automatically re-sized to fill the form. The same things happens at
runtime - i.e. re-sizing of the components happens automatically, there
doesn't appear to be any explicit code involved. Does anybody know how
this works?


Ray Lischner

unread,
Dec 12, 1996, 3:00:00 AM12/12/96
to

On 11 Dec 1996 16:37:12 GMT, "Andrew jackson"
<ajac...@cccgroup.co.uk> wrote:

When a control (including a form) resizes, it calls AlignControls to
realign its controls. A control sets its Align property to be
realigned. It's a crude mechanism, but it works well for simple cases.
--
Ray Lischner, Tempest Software, Inc., Corvallis, Oregon, USA
Author of Secrets of Delphi 2 (http://www.tempest-sw.com/secrets/)

Chami

unread,
Dec 12, 1996, 3:00:00 AM12/12/96
to

- pick the control you want to resize
- set it's "Align" property to "alClient"

for example, let's say you have three controls called A, B, and C. if you
want A to resize to fill the extra space:

A.Align := alClient;
B.Align := alBottom; { or alTop, alLeft, alRight }
C.Align := alBottom; { or alTop, alLeft, alRight }

--
http://www.ChamisPlace.com/delphi/
The place to get new Delphi tips and tricks daily

Andrew jackson <ajac...@cccgroup.co.uk> wrote in article
<01bbe781$feeccd70$4d0170c1@percy>...

0 new messages