B4J Question SplitPane

moore_it

Well-Known Member
Licensed User
Longtime User
Hi all,
it's possible to read splitpane nodes ?
Thanks in advice
 

stevel05

Expert
Licensed User
Longtime User
The simple answer is yes, this code will find and list the panes added and their contents. Getting something useful out of it may be a little more difficult.

B4X:
    Dim SPJO As JavaObject = SplitPane1
    Dim L As List = SPJO.RunmethodJO("getChildrenUnmodifiable",Null)
    For i = 0 To L.Size - 1
        Dim P As Pane = L.Get(i)
        Dim PJO As JavaObject = P
        Dim L1 As List = PJO.RunMethod("getChildren",Null)
        For Each N As Node In L1
            If GetType(N) = "anywheresoftware.b4j.objects.PaneWrapper$ConcretePaneWrapper$NonResizePane" Then
                Dim P As Pane = N
                Log(P)
                For Each N As Node In P.GetAllViewsRecursive
                    Log("     " & N)
                Next
            End If
        Next
    Next
 
Upvote 0
Top