Jface's CheckboxTreeViewer how to set initial selection
Posted
by Hypercube
on Stack Overflow
See other posts from Stack Overflow
or by Hypercube
Published on 2010-06-06T23:39:51Z
Indexed on
2010/06/06
23:52 UTC
Read the original article
Hit count: 398
Hello. This question may sounds trivial, but i am struggling with the issue, so, please help if u can. So, here it is : i am using a CheckboxTreeViewer
for some good reasons. I've google-it for some class usages, and i am currently able to check/uncheck all the childrens of a selected node, and to preserve the selection after a live search with a custom implementation of the StyledCellLabelProvider
provider. All good so far. However, so far i am unable to programatically select one or more elements of the tree viewer after i display the widget and call the setInput()
method of the viewer.
So, let's assume for instance that the tree will have 10 main nodes, and 5 leafs on node 6. My question is how do i set the checked state of the 3rd leaf?
Thank u.
© Stack Overflow or respective owner