Reputation: 38265
Env: Java SE 6
I am working on an Eclipse RCP application. How do I create TreeItems with tri-state checkbox. Like the Eclipse IDE update package interface. I use SWT TreeItem class now, which only provides API, setChecked(bool), for true/false states.
Upvotes: 0
Views: 771
Reputation: 111217
The filled in check box is known as 'grayed'.
With CheckboxTreeViewer
use the setGrayed
, setGrayChecked
, setGrayedElements
methods to set grayed items.
With TreeItem
use the setGrayed
method.
It is up to you to code the logic for determining when a node should be grayed.
Upvotes: 3