Designer Scripts - incorrect code?

ciginfo

Well-Known Member
Licensed User
Longtime User
Hi,
Someone you can look at and try the layout attached ?

When I am sending to UI Cloud. On every device.
1) Why "Button5" is not indented from the right edge of "Panel1" ?
2) Why "button6" does not appear in "Panel2"
3) Why "Label2" stays on the bottom "Panel2" as the code puts it up on the top.
What are the errors of code in the Script Designer?
Thank you
 

Attachments

  • main1.bal
    4.8 KB · Views: 135

klaus

Expert
Licensed User
Longtime User
These Lines are wrong:
B4X:
Button3.Height = 40dip
Button3.Left = Panel1.Left - 10dip
Button3.Bottom = Panel1.Bottom - 10dip
Button5.Height = 40dip
Button5.Right = Panel1.Right - 10dip
Button5.Bottom = Panel1.Bottom - 10dip
Button4.Height = 40dip
Button4.HorizontalCenter = 50%x
Button4.Bottom = Panel1.Bottom - 10dip

Label2.Top = Panel2.Top - 3dip
Label2.Width = 50%x 
Label2.HorizontalCenter = 50%x
    
Button6.Bottom = Panel2.Bottom - 3dip
Button6.Width = 50%x 
Button6.HorizontalCenter = 50%x
They shoud be :
B4X:
Button3.Height = 40dip
Button3.Left = 0
Button3.Bottom = Panel1.Height - 10dip ' -10dip?
Button5.Height = 40dip
Button5.Right = Panel1.Width
Button5.Bottom = Panel1.Height - 10dip  ' -10dip?
Button4.Height = 40dip
Button4.HorizontalCenter = 50%x
Button4.Bottom = Panel1.Height- 10dip  ' -10dip?

Label2.Top = - 3dip
Label2.Width = 50%x 
Label2.HorizontalCenter = 50%x
    
Button6.Bottom = - 3dip
Button6.Width = 50%x 
Button6.HorizontalCenter = 50%x
The positions of views on another view are referenced to the top left corner of the parent view.
If a Labels top-left corner should be in the top-left corner of the parent panel Label.Left = 0 and not Panel.Left anf Label.Top = 0 and not Panel.Top.

Best regards.
 
Upvote 0

ciginfo

Well-Known Member
Licensed User
Longtime User
OK thank you, but why button4 is not on center of the panel? "Button4.HorizontalCenter = 50%x"
 
Upvote 0
Top