Wish Relative anchors

Pflichtfeld

Active Member
Licensed User
The anchor concept makes things lots easier, am glad that they exist. But: the better concept is the enemy of the good concept.
After struggling hard and spending much time in layout-issues, I am shure that it would be a great help, if the anchors would not be absolute but relative: Top: %x to top, Left: %y to left, Right: %y to right, bottom: %y to bottom.
Only then the views are relative to screen or panel, they are loaded in and keep their relative location and size, and programmers would not have to waste lots of time, making their layout convenient to all devices and orientations.
 

Erel

B4X founder
Staff member
Licensed User
Longtime User
With the exception of special cases such as games, there is no reason that the screen layout will change in the same proportion as the screen.
If you do want to use percentage then do it with the designer script.
AutoScaleAll slightly increases the proportions based on the ratio between the device screen size and the variant size.
 

Pflichtfeld

Active Member
Licensed User
The little demo may show, that designerscripts are necessary very often. If there were relative anchors, no script would be needed at all.
 

Attachments

  • panel-Layout.zip
    10.4 KB · Views: 194
Top