how to add image after a tree node in SWT [message #445735] |
Wed, 10 November 2004 07:49 |
Eclipse User |
|
|
|
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 #445779 is a reply to message #445740] |
Thu, 11 November 2004 03:26 |
Eclipse User |
|
|
|
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
|
|
|
|
Powered by
FUDForum. Page generated in 0.02654 seconds