Forum > Designer
[SOLVED] anchors auto resize
howardpc:
Isn't it easy when you know how?
mercury:
@howardpc
Thanks. Your code is working. But I want the button auto resize(when form resize) not auto create.
And I don't want code in OnResize event, it's a trouble when the form contains lots of widget(not just button, also many other types).
@Blaazen
Yes, your method is what I need, thank you.
But when I add a button in panel, look picA. Panel1 is biger than others.
How to make them all same size.
In other words, I want zoom the whole form like zoom a photo when form resize.
Blaazen:
Interesting, I didn't noticed this before.
I have solution: remove all anchors of the button on the panel ( Anchors := [ ]; ) and resize the form a little.
mercury:
--- Quote from: Blaazen on February 17, 2015, 12:40:24 pm ---Interesting, I didn't noticed this before.
I have solution: remove all anchors of the button on the panel ( Anchors := [ ]; ) and resize the form a little.
--- End quote ---
But widgets in panel will not auto resize.
Is there any way to set "Width", "Height", "Top" and "Left" in "%" not in "px".Some thing like "<table>" in HTML.
In GTK there is "table's boxes", and in wxWidgets there is "wxGridSizer".
Is there same thing in LCL?
Mike.Cornflake:
--- Quote ---In GTK there is "table's boxes", and in wxWidgets there is "wxGridSizer".
Is there same thing in LCL?
--- End quote ---
Not that I'm aware of.
Does this help?
http://wiki.lazarus.freepascal.org/Autosize_/_Layout
Navigation
[0] Message Index
[#] Next page
[*] Previous page