Forum > Android

visual layout not working

(1/3) > >>

petex:
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:
Is this, what you want to achieve?

petex:
yes something like that

petex:
ok, you have three panels.
In the first panel, how do you get the buttons to anchor such that they form a column ?

dseligo:

--- Quote from: petex on November 03, 2024, 03:26:57 pm ---ok, you have three panels.
In the first panel, how do you get the buttons to anchor such that they form a column ?

--- End quote ---

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.

Navigation

[0] Message Index

[#] Next page

Go to full version