Hi,
I am wondering about this strange behaviour:
I have created a Form1 and added a Label1 with the designer. Label1 has the following properties:
top = 50
left = 100
width = 50
height = 20
After that, I added this code:
If I start this code on the desktop, I can see (as shown in the attachment):
- Label1 is the reference
- Label2 is displaced (2 pixels HIGHER than Label1)
- Label3 has the same top position as Label1
If I start that code on the device I'll get the (estimated) result:
- Label1 is the reference
- Label2 has the same top position as Label1
- Label3 is displaced (2 pixels LOWER than Label1)
So why does this happen on the desktop?
specci48
I am wondering about this strange behaviour:
I have created a Form1 and added a Label1 with the designer. Label1 has the following properties:
top = 50
left = 100
width = 50
height = 20
After that, I added this code:
B4X:
Sub Globals
End Sub
Sub App_Start
Form1.Show
AddLabel("Form1","Label2",50,Label1.Top,Label1.Width,Label1.Height,"Label2")
AddLabel("Form1","Label3",150,Label1.Top + 2,Label1.Width,Label1.Height,"Label3")
End Sub
If I start this code on the desktop, I can see (as shown in the attachment):
- Label1 is the reference
- Label2 is displaced (2 pixels HIGHER than Label1)
- Label3 has the same top position as Label1
If I start that code on the device I'll get the (estimated) result:
- Label1 is the reference
- Label2 has the same top position as Label1
- Label3 is displaced (2 pixels LOWER than Label1)
So why does this happen on the desktop?
specci48