Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Standard Widget Toolkit (SWT) » how to add image after a tree node in SWT
how to add image after a tree node in SWT [message #445735] Wed, 10 November 2004 07:49 Go to next message
Eclipse UserFriend
Originally posted by: jyzhang.superv.com.cn

HI, all.

we can use treeViewer.setLabelProvider(lp), and return image in
lp.getImage() to insert image before a tree node(text).
or we can treeItem.setImage() to set image before a tree node(text)

but now I need to insert an image after a tree node,
it means display the image after text, how to implement it?

I have tried add a label in TreeEditor, and setImage for the label,
but I haven't got success.

Anyone can help me?
Thanks a lot.
Re: how to add image after a tree node in SWT [message #445740 is a reply to message #445735] Wed, 10 November 2004 11:52 Go to previous messageGo to next message
Tiberiu Caprita is currently offline Tiberiu CapritaFriend
Messages: 68
Registered: July 2009
Member
One solution: You can use a TableTree (Viewer!?), in the second column of
Table putting just a Image.

Tiberiu
Re: how to add image after a tree node in SWT [message #445779 is a reply to message #445740] Thu, 11 November 2004 03:26 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: jyzhang.superv.com.cn

good idea, I'll try it, thanks a lot!

but is there any other idea?
in awt/swing, I override TreeCellRenderer.getTreeCellRendererComponent() {
JPanel panel....
panel.add(this);
panel.add(new JLabel(imageIcon))
}
how to get it in swt?


Tiberiu Caprita wrote:

> One solution: You can use a TableTree (Viewer!?), in the second column of
> Table putting just a Image.

> Tiberiu
Re: how to add image after a tree node in SWT [message #446001 is a reply to message #445740] Tue, 16 November 2004 07:18 Go to previous message
Eclipse UserFriend
Originally posted by: yvon_thoraval.mac.com

Tiberiu Caprita a écrit :
> One solution: You can use a TableTree (Viewer!?), in the second column
> of Table putting just a Image.

Could we change column 0 icons (open and close) ?
Previous Topic:PrinterDialog - default settings
Next Topic:Graphic library
Goto Forum:
  


Current Time: Fri Apr 19 21:03:16 GMT 2024

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

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

Back to the top