Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Standard Widget Toolkit (SWT) » Add icon in a TableTree
Add icon in a TableTree [message #460403] Wed, 24 August 2005 17:17 Go to next message
oscar is currently offline oscarFriend
Messages: 1
Registered: July 2009
Junior Member
Hello, I am using a swt TableTree component. I have 2 columns.

I am trying to put an Icon for every node. The icon appears if a use:

TableTreeItem item1 = new TableTreeItem(tableTree,SWT.NULL);
item1.setText(0,"BPL 1");
item1.setImage(1,image);

However I would like : first the image and then the text.

TableTreeItem item1 = new TableTreeItem(tableTree,SWT.NULL);
item1.setText(1,"BPL 1");
item1.setImage(0,image);

But that doesn't work.


Any idea?

Thanks.
Re: Add icon in a TableTree [message #460412 is a reply to message #460403] Thu, 25 August 2005 13:09 Go to previous message
Grant Gayed is currently offline Grant GayedFriend
Messages: 2150
Registered: July 2009
Senior Member
TableTree does not support putting an image in column 0 (report:
https://bugs.eclipse.org/bugs/show_bug.cgi?id=25007 ).

However, as of 3.1 TableTree has been deprecated in favour of using a Tree
with TreeColumns. You should use this instead because it utilizes the
native Tree widget properly, and will allow you to put images in the first
column.

Grant

"oscar" <OE_PROMOS@TERRA.ES> wrote in message
news:4b73c6d1af3651cdd97b9bc3f4a6cf6c$1@www.eclipse.org...
> Hello, I am using a swt TableTree component. I have 2 columns.
>
> I am trying to put an Icon for every node. The icon appears if a use:
>
> TableTreeItem item1 = new TableTreeItem(tableTree,SWT.NULL);
> item1.setText(0,"BPL 1");
> item1.setImage(1,image);
>
> However I would like : first the image and then the text.
>
> TableTreeItem item1 = new TableTreeItem(tableTree,SWT.NULL);
> item1.setText(1,"BPL 1");
> item1.setImage(0,image);
>
> But that doesn't work.
>
>
> Any idea?
>
> Thanks.
>
Previous Topic:Uninitialise plugin
Next Topic:duplicate entries in TableViewer
Goto Forum:
  


Current Time: Fri Apr 16 15:31:36 GMT 2021

Powered by FUDForum. Page generated in 0.02321 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top