Setting anchors dynamically? lazarus / 61-Beginners ---------------------------------------------------------------------- Trenatos · 2015-08-12 18:19 My project is progressing nicely, I've run into a new problem and figured a new thread would be a good idea in case someone else runs into the same thing. I'm dynamically creating SynEdit components at runtime, easy peasy, but I can't figure out how to set the anchors. Now, I know I can set simple anchors, but I'd like to set anchors with siblings, which I haven't found an example on how to do programmatically. ---------------------------------------------------------------------- Trenatos · 2015-08-12 18:23 Bah, timing, I found an example and it seems to work: SEdit.AnchorToNeighbour(akLeft, 0, serverList); ---------------------------------------------------------------------- Blaazen · 2015-08-12 20:29 See attached screenshot from Anchor Editor. The first icon is AnchorParallel(); The second icon is AnchorToNeighbour(); The third icon is AnchorHorizontal(); (or AnchorVertical) There is also method AnchorToCompanion(); - it is combination of AnchorToNeighbour and AnchorParallel. Ex.: AnchorToCompanion(akTop, 5, ...); is AnchorToNeighbour(akTop, 5, ...); AnchorParallel(akLeft, 0, ...); AnchorParallel(akRight, 0, ...); ---------------------------------------------------------------------- Trenatos · 2015-08-12 21:09 Nice, thanks for the added info Blaazen