B4J Question TreeView set Selected item by code

woniol

Active Member
Licensed User
Longtime User
Hi,
is there a way to set item as Selected by code in TreeView ?
 

woniol

Active Member
Licensed User
Longtime User
Sorry, it doesn't work.
B4X:
java.lang.RuntimeException: Method: getSelection not found in: javafx.scene.control.TreeView
 
Upvote 0

woniol

Active Member
Licensed User
Longtime User
Sorry, it doesn't work.
B4X:
java.lang.RuntimeException: Method: getSelection not found in: javafx.scene.control.TreeView
But it works fine like this:
B4X:
Dim jo AsJavaObject = TreeView1
jo.RunMethodJO("getSelectionModel", Null).RunMethod("select", Array(TreeItem1))
Thanks for your help :)
 
Upvote 0
Top