brelto85 Active Member Licensed User Longtime User Nov 9, 2013 #1 In the Designer Script, how can set the horizontal or vertical centering according to the container and not the entire layout? For example, if i set the VerticalCenter = 50%Y of a panel that is contained in another panel, its position is centered vertical according the layout
In the Designer Script, how can set the horizontal or vertical centering according to the container and not the entire layout? For example, if i set the VerticalCenter = 50%Y of a panel that is contained in another panel, its position is centered vertical according the layout
NJDude Expert Licensed User Longtime User Nov 9, 2013 #2 Assuming you have 2 panels Panel1 and Panel2 (Panel2 is contained in Panel1), you can do this in the designer scripts: B4X: Panel1.Width = 60%x Panel1.Height = 60%y Panel1.HorizontalCenter = 50%x Panel1.VerticalCenter = 50%y Panel2.Width = Panel1.Width / 2 Panel2.Height = Panel1.Height / 2 Panel2.Left = Panel1.Width / 4 Panel2.Top = Panel1.Height / 4 Last edited: Nov 9, 2013 Upvote 0
Assuming you have 2 panels Panel1 and Panel2 (Panel2 is contained in Panel1), you can do this in the designer scripts: B4X: Panel1.Width = 60%x Panel1.Height = 60%y Panel1.HorizontalCenter = 50%x Panel1.VerticalCenter = 50%y Panel2.Width = Panel1.Width / 2 Panel2.Height = Panel1.Height / 2 Panel2.Left = Panel1.Width / 4 Panel2.Top = Panel1.Height / 4