On 30.04.2013 19:50, waldo kitty wrote:
in the recent playing around with the code in the "flicker" thread, i wanted to make the tmemo automatically resize to fit the form when it is resized and to keep the button where i placed it and visible... the align and alignment options confuse this old boy as does much of the GUI world of coding... i had some luck with a groupbox but it wasn't satisfactory... can someone please explain, in very simple terms and steps, how to accomplish this? i have no delphi books available and what i have looked at online has only served to confuse me further :/
The Anchors and Align properties are what you need here. Align allows you to tell a control to always stay at the top/left/right/bottom or to always fill the remaining client area that these controls leave. With Anchors you can basically "pin" a side to its parent (e.g. a form or a panel). So by setting a memo's anchors for all for sides to true (or setting in code the anchors to [akLeft, akTop, akRight, akBottom]) will result in the memo resizing with the underlying control (e.g. the form).
For more (also advanced) information you can (and maybe even should) take a look here: http://wiki.freepascal.org/Autosize_/_Layout
Regards, Sven -- _______________________________________________ Lazarus mailing list [email protected] http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
