B4J Question TreeTableView, doesn't autoscroll [solved]

swChef

Active Member
Licensed User
Longtime User
When the SelectedItem is programmatically set, the TreeTableView does not scroll the item into view. But it does highlight.
Unlike some other view controls, the B4J TreeTableView does not have a ScrollTo (exposed).

[Found partial solution via searching] Use JavaObject and access the scrollTo

[Reviewed JavaFX source for TTV to realize the following complete solution]

B4X:
Dim jo As JavaObject = TreeTableView1 ' the TreeTableView
Dim iTTVindex As Int = jo.RunMethod("getRow",Array(tti)) ' for TreeTableItem tti
jo.RunMethod("scrollTo",Array(iTTVindex))
 
Last edited:
Top