Newsgroups : Borland : borland.public.delphi.nativeapi.win32 : 2008 Feb : Resizing controls with form

www.cryer.info
Managed Newsgroup Archive

Resizing controls with form

Subject:Resizing controls with form
Posted by:"Mark Smith" (marksmi..@jungle-monkey.com)
Date:Mon, 4 Feb 2008 00:37:53

If I want my application window to be able to be resized (within limits)
what is the best way to resize the controls contained within the form?

Is the only way to define an on resize event like this to manually scale
every single control:

Tab.width := form.width - tab.left*2
Tab.height := form.height - tap.top*2
control1.width:=tab.width/3
control2.width:=tab.width/2
... etc

Obviously this could get messy and hard to maintain when working with
lots and lots of controls... Is there an easier option?

Thanks

Replies:

www.cryer.info
Managed Newsgroup Archive