I have an app under development and am working on the layout for the first (Main) Acitivity.
The code that is giving problems is "btnChkPicks.Top = lblPicked.Top".
However, the tops of the lblPicked and btnChkPicks do not line up. The Log shows:
lblPicked.Top = 31
btnChkPicks.Top = 6
I can't see what I am doing wrong.
Also, should not the %x and %y values of an object be relative to the object's parent (the paent of both the obove objects is a panel)?
Thanks.
The code that is giving problems is "btnChkPicks.Top = lblPicked.Top".
B4X:
'Set Game Item Pick label.
lblPicked.Width = 22%x
lblPicked.HorizontalCenter = 50%x
lblPicked.Height = pnlGame.Height * .47
lblPicked.VerticalCenter = 27%y
'Set Buttons
'Set Show Picks button.
btnChkPicks.Top = lblPicked.Top 'This line not working correctly.
btnChkPicks.Width = lblPicked.Left * .50
btnChkPicks.HorizontalCenter = lblPicked.Left * .50
btnChkPicks.Bottom = lblPicked.Height - (btnChkPicks.Top - lblPicked.Top)
However, the tops of the lblPicked and btnChkPicks do not line up. The Log shows:
lblPicked.Top = 31
btnChkPicks.Top = 6
I can't see what I am doing wrong.
Also, should not the %x and %y values of an object be relative to the object's parent (the paent of both the obove objects is a panel)?
Thanks.
Last edited: