Resize form and anchor controls lazarus / 31-LCL ---------------------------------------------------------------------- mirce.vladimirov · 2012-04-25 15:42 Suppose i have a form with 150 controls on it (buttons, combos, edits, dbgrids, groupboxes etc...). And suppose i want to resize it to fit different screen resolutions, and when i do so, all controls are kept in proper places, no overlaping and no dissapearing. I do know the "anchors" stuff, but how to do it programatically, so i don't need to click 600 (yes, six hundred) times because 150 controls on the form is multyplied by 4 clicks  to set all four anchors (left, righ, top, bottom) on the object inspector ? ---------------------------------------------------------------------- User137 · 2012-04-25 16:16 You can manually create the controls too, and store them in an array. 1 foor loop with total 2 lines of code at minimum can alter even thousands of objects quickly. Or in the IDE you can select them all at once, and set properties 1 time to change them all. ---------------------------------------------------------------------- mirce.vladimirov · 2012-04-25 19:03 QuoteOr in the IDE you can select them all at once, and set properties 1 time to change them allI do that now, but it's not good enough for me. Quote1 foor loop with total 2 lines of code at minimum can alter even thousands of objects quickly.OK, how ? Is there an example so I can learn, I could make a function to do that with all my forms. ---------------------------------------------------------------------- Avishai · 2012-04-25 19:56 Take a look at AnchorToCompinion, AnchorToNeighbor, AnchorSide and others.  This may be what you are looking for.