Hi there –
I have the pro version and am trying to use focusItem()
I load in my notes from XML, and all itemIDs are numbers. (ex: id=“10”, etc).
I am trying to focus on item ID “10”.
The following, however, doesn’t do anything at all:
tree.selectItem(“10”);
tree.focusItem(“10”);
Any suggestions?
Thx
Hello,
please check that these methods are called after xml loading and item with id=10 is presented in the loaded xml:
tree.loadXML(“some.xml”,doAfterXMLLoading);
function doAfterXMLLoading(){
tree.selectItem(“10”);
tree.focusItem(“10”);
}
Thanks, that was the problem. The focusItem() was being called before the XML fully rendered the tree.