[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Newsgroup Home]
[news.eclipse.platform.swt] Add Composite on treeitem of TreeViewer

Hi All,

I am currently working on SWT/JFace TreeViewer. I want to have a composite with 2-3 buttons as a TreeItem (node) of TreeViewer instead of text which is the default one displayed as TreeItem. I want to add different event listeners
to these TreeItem buttons.


I tried to set Composite using the setData() method in TreeItem but it doesn't seem to be working. Also I tried modifying ContentProvider and LabelProvider of TreeViewer to add composite/button but the method does getText() and getImage(). Can I override LabelProvider to display any UI component instead of String?

Please guide me as to how I can achieve this.

Thanks in advance.

Regards,
Gaurav Dubey