ph09
ph09

Reputation: 1052

JFace: CheckboxTreeviewer with checkboxes for specific nodes

I'm using a Jface CheckboxTreeViewer and wondering if it's possible to provide only specific nodes with checkboxes. I'm afraid that there is no native support and won't be easy to implement. Maybe someone cann help me with this.

Cheers, Phil

Upvotes: 2

Views: 1015

Answers (1)

greg-449
greg-449

Reputation: 111142

You can't do this with CheckboxTreeViewer.

You can use org.eclipse.jface.viewers.OwnerDrawLabelProvider to draw anything you like in a TreeViewer, so you could use that see http://www.vogella.com/articles/EclipseJFaceTableAdvanced/article.html

For just check boxes you could just use the images returned by a normal label provider to show nothing / checked / unchecked.

Upvotes: 2

Related Questions