I'm trying to create a dynamic layout with my Delphi VCL application. The normal app should look like this:
When the user check "Extract extracted files", I need a big button appear under it.
Now when the user uncheck "Extract extracted files", the app should look like the first image. What's the proper way to implement this kind of layout in Delphi VCL? In some other GUI frameworks, I could use some layout managers to implement this. But in Delphi VCL, I always use anchors. I could calculate control bounds and move them accordingly. But I don't feel it's the right way to do it.
mNotes.Top := cbExtract.BoundsRect.Bottom + Space
). You could also use a borderlessTPanel
(setBevelOuter = bvNone
) as a child container below the checkbox, so that the panel occupies the entire space occupied by the memo when it is large. Then you could let the memo be anAlign = alClient
child of this panel, and the button anAlign = alTop
child of the same panel. SetAlignWithMargins = True
and adjust margins so it looks good. You may also nest panels or use new fancy stuff like...TFlowPanel
,TGridPanel
,TRelativePanel
,TStackPanel
etc.&Search from here:
,&Browse...
,&Enable
, etc.) and to make sure that the tab order is correct.