visual layout not working lazarus / 43-Android ---------------------------------------------------------------------- petex · 2024-11-03 12:31 I started to modify a working demo. I added a 2D grid of buttons. The left column has the property "pos relative to parent" as rpLeft, the middle column to rgCenterHorizontal and the right hand column to rpRight. When I run it, each column is superimposed at the top and there is no vertical separation of the buttons. The top most button is active, If I just design a layout with no anchoring, every visual object appears at the top left. So the visual layout bears no relation to what actually happens. How can I achieve my aim here ? ---------------------------------------------------------------------- kirchfritz · 2024-11-03 14:19 Is this, what you want to achieve? ---------------------------------------------------------------------- petex · 2024-11-03 14:25 yes something like that ---------------------------------------------------------------------- petex · 2024-11-03 14:26 ok, you have three panels. In the first panel, how do you get the buttons to anchor such that they form a column ? ---------------------------------------------------------------------- dseligo · 2024-11-03 14:58 Quote from: petex on November 03, 2024, 03:26:57 pmok, you have three panels. In the first panel, how do you get the buttons to anchor such that they form a column ? In Button2 set Anchor property to be Button1. In Button3 set Anchor property to be Button2. In Button4 set Anchor property to be Button3. Then in Button2, Button3 and Button4 in PosRelativeToAnchor in object inspector check 'raBelow' (see attachment). If you will still have problem, post unit and form files here. ---------------------------------------------------------------------- MarkMLl · 2024-11-03 16:07 If the particular controls you're using have an "Anchors" property, you'll find that the Anchor Editor accessible from the "..." to the right of the value field will make things enormously easier. MarkMLl ---------------------------------------------------------------------- dseligo · 2024-11-03 20:07 Quote from: MarkMLl on November 03, 2024, 05:07:17 pmIf the particular controls you're using have an "Anchors" property, you'll find that the Anchor Editor accessible from the "..." to the right of the value field will make things enormously easier. You can't use Anchor Editor in LAMW. ---------------------------------------------------------------------- kirchfritz · 2024-11-03 21:26 Quote from: petex on November 03, 2024, 03:26:57 pmok, you have three panels. In the first panel, how do you get the buttons to anchor such that they form a column ? here is my sourcecode I am using the panels childsizing property see screenshot ---------------------------------------------------------------------- MarkMLl · 2024-11-04 08:27 Quote from: dseligo on November 03, 2024, 09:07:34 pmYou can't use Anchor Editor in LAMW. My apologies, I'd not spotted the OS. MarkMLl ---------------------------------------------------------------------- dseligo · 2024-11-04 08:39 Quote from: MarkMLl on November 04, 2024, 09:27:47 amQuote from: dseligo on November 03, 2024, 09:07:34 pmYou can't use Anchor Editor in LAMW. My apologies, I'd not spotted the OS. MarkMLl Np. I usually don't notice in what board message is, but "pos relative to parent" and "rpLeft" caught my eye (since I use LAMW). ---------------------------------------------------------------------- MarkMLl · 2024-11-04 08:44 Quote from: dseligo on November 04, 2024, 09:39:03 amNp. I usually don't notice in what board message is, but "pos relative to parent" and "rpLeft" caught my eye (since I use LAMW). In my own feeble defence, I'd read the thread ans specifically looked for info on the OS etc. in the OP. MarkMLl