B4J Question Find Vertical Scroll Bars (TableView vs SplitPane)

T201016

Active Member
Licensed User
Longtime User
It works fine for the TableView, and for the SplitPane it does not.
Is the method below correct?

Detail: SplitPane consists of two windows vertically separated.

FindVerticalScrollBars:
Private Sub FindVerticalScrollBars (sp As SplitPane) As JavaObject
    Dim jo As JavaObject = sp
    Dim bars() As Object = jo.RunMethodJO("lookupAll", Array(".scroll-bar")).RunMethod("toArray", Null)
    Log(bars.Length) 'error Length = 0
    For Each baro As JavaObject In bars
        Dim orientation As String = baro.RunMethod("getOrientation", Null)
        If orientation = "VERTICAL" Then
            Log("OK")
            Return baro
        End If
    Next
    Return Null
End Sub
 

Attachments

  • SplitPane.png
    SplitPane.png
    4.1 KB · Views: 10
Top