The Wiert Corner – irregular stream of stuff

Jeroen W. Pluimers on .NET, C#, Delphi, databases, and personal interests

  • My badges

  • Twitter Updates

    • RT @AndSimonSaid: Mijn baas werkt thuis en vraagt me haastig via whatsapp dat ik haar om drie uur moet bellen. Lijkt best serieus dus om dr… 3 hours ago
    • RT @samgerrits: Precies een jaar geleden trok ik aan de bel om een ernstig besmettelijke SARS variant die ik "SARS 2.0" noemde. Om politiek… 3 hours ago
    • @CBoonacker Ik had een minder loodzwaar traject toegewenst. Kennelijk niet gelukt. Daarom veel sterkte. 3 hours ago
    • RT @locuta: Navalny is naar de gevangenis gestuurd waar eerder Magnitsky door de Russische overheid werd vermoord. Hij moet daar 30 dagen b… 3 hours ago
    • RT @claudiadebreij: Dit is zoooo South Park 🤪 ‘Just wanna let you guys know, this is THE sacredest place.’ 3 hours ago
  • My Flickr Stream

  • Pages

  • All categories

  • Enter your email address to subscribe to this blog and receive notifications of new posts by email.

    Join 2,229 other followers

Delphi: AutoSize property resizes a container (panel, scrollbox, form, frame…) to grow it to fit all controls

Posted by jpluimers on 2018/12/26

A while back I needed a design-time way to automatically resize a Delphi container control (descendants from the, [WayBackTWinControl Class like [WayBack] TPanel, [WayBack] TScrollbox, [WayBack] TForm, [WayBack] TFrame) to grow/shrink so it just fits around it’s contained controls.

Back then I needed it for VCL design time, if possible taking into account non-visual components.

The [WayBackTControl.AutoSize Property does just that for visual controls and works way better than suggestions on doing this manually.

Manually adjusting many controls at design time is a tedious job, especially when trying to prevent mouse usage (I’ve had RSI in the early 1990s, so I’m extra careful).

Thanks Uwe Raabe for helping me out on this.

I’ve not had the need for non-visual components or FMX yet, but if I ever need it, then this piece of code by Stefan Glienke might work:

[[Delphi] ResizeControlEditor –


Source: [WayBack] Is there an expert that can resize a container (panel, scrollbox, form, frame, etc) to be just large enough so it fits all it components?So: grow when… – Jeroen Wiert Pluimers – Google+



Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.

%d bloggers like this: