Hello everyone!
Someone knows the right way to get the height of a layout?
I create a function to get the bottom of last view on layout, but not working because when I get the view.top and view.height, some views came wrong (with negative values).
Look the negative value of this Label (-30 ??????)
Somebody can explain that behavior?
Thank You
Alberto Iglesias
Someone knows the right way to get the height of a layout?
I create a function to get the bottom of last view on layout, but not working because when I get the view.top and view.height, some views came wrong (with negative values).
B4X:
Sub FU_LayoutHeight(p As Panel) As Long
Dim lMax As Long = 0
For Each v As View In p.GetAllViewsRecursive
Log(v.Tag & "/" & v.Top & "/" & v.Height)
If v.Top + v.Height > lMax Then
lMax = v.Top + v.Height
End If
Next
Return lMax
End Sub
Look the negative value of this Label (-30 ??????)
Somebody can explain that behavior?
Thank You
Alberto Iglesias