Sub GetTopParent(XV As B4XView) As Object
If XV.Parent.IsInitialized = False Or XV.Parent = Null Then
Return XV
Else
Return GetTopParent(XV.Parent)
End If
End Sub
in B4J (I made the wrong choice, I should have opened this thread in the B4J forum) it returns an AnchorPane, not the Form ?
P.S. It's fine for me anyway; I need to get the width and height of the top container of a B4XView and these two values of the returned AnchorPane should be what I need.