Eclipse Community Forums - RDF feed
https://www.eclipse.org/forums/
Eclipse Community ForumsTreeViewer with special rendering for items
https://www.eclipse.org/forums/index.php/mv/msg/159011/502219/#msg_502219
Question about TreeViewers :
The basic rendering often presented as examples is a class implementing the interface ILabelProvider which defines two methods public Image getImage(Object element) and public String getText(Object element). This instance of ILabelProvider is parameter of the setLabelProvider method on the Treeviewer.
The question is :
Is it possible to build a TreeViewer with special rendering for items visible in the tree (setting a more sophisticated rendering with StyledText for instance)?
I want for example to have a particular background color for special items in the tree or special fonts, ...
Any help would be appreciated.
Regards
]]>cdsosi2009-12-07T09:41:51-00:00Re: TreeViewer with special rendering for items
https://www.eclipse.org/forums/index.php/mv/msg/159011/502235/#msg_502235
http://wiki.eclipse.org/JFaceSnippets#Snippet049StyledCellLa belProvider
cdsosi schrieb:
> Hi,
> Question about TreeViewers :
>
> The basic rendering often presented as examples is a class implementing
> the interface ILabelProvider which defines two methods public Image
> getImage(Object element) and public String getText(Object element). This
> instance of ILabelProvider is parameter of the setLabelProvider method
> on the Treeviewer.
>
> The question is :
> Is it possible to build a TreeViewer with special rendering for items
> visible in the tree (setting a more sophisticated rendering with
> StyledText for instance)?
> I want for example to have a particular background color for special
> items in the tree or special fonts, ...
>
> Any help would be appreciated.
>
> Regards
>]]>Thomas Schindl2009-12-07T10:48:25-00:00