B4J Question Get nodes from Pane (SOLVED)

josete

Member
Licensed User
Longtime User
I have a pane where i add some nodes (buttons,labels,sliders...) at runtime ,and drag them at the position that i want to make a layout.When finished,i want to get all the nodes added and save properties as width,height,top,left,text,etc,etc.I try thi code:
B4X:
For i = 0 To pnlViews.NumberOfNodes -1
        Dim n As Node
        n = pnlViews.GetNode(i)
        Log(n.Left & " " & n.Top)
    Next
and
B4X:
For  each n as Node in pnlViews.GetAllViewsRecursive
  'the same problem,don't find hight,width,etc
Next

but i can't find in node type all properties that i need ,as height or width,etc .There's any way to acces?
 

josete

Member
Licensed User
Longtime User
thanks erel,it works for some properties ,but not for others like text button ,maxvalue or minvalue of sliders,etc .another way?
 
Upvote 0

josete

Member
Licensed User
Longtime User
Solved but i must to do the same comparation for every type control:
B4X:
For Each n As Node In pnlViews.GetAllViewsRecursive
        If n Is Slider Then
            Dim b As Slider
            b.Initialize("")
            b = n
            Log(b.MaxValue)
        End If
    Next
 
Upvote 0
Top