-
18 Jan 2013 2:40 AM #1
Set focus to a tree node
Set focus to a tree node
Any way to set focus to a tree node programmatically?
-
18 Jan 2013 11:08 AM #2
What do you mean by focus? Are you trying to edit the cell there? Or select the row?
To find the element in there (could be useful if doing something with a cell:
To just scroll to the element in question:Code:TreeNode<MyModel> node = tree.findElement(someModelObject); Element elt = tree.getView().getTextElement(node); //do something with elt
To select it:Code:tree.scrollIntoView(someModelObject);
Code:tree.getSelectionModel().select(someModelObject, false);
-
21 Jan 2013 12:44 AM #3
Got it! Thank you. I kept diving into "focus" methods


Reply With Quote