|Re: how to change colour of label in swt tree editor [message #1021736 is a reply to message #1019345]
||Wed, 20 March 2013 15:44
| Wim Jongman
Registered: July 2009
Hi abc, |
I think you are looking for a IStyledLabelProvider.
> I have a TreeEditor and some text in its first column. I need to append
some text to it using a label or string. In addition, I want to change the
color of the appended string to green. I tried to do it with this code, but
it isn't working:
> Label label = new Label(this.tree ,SWT.RIGHT);
> label.setFont(new Font(getSite().getShell().getDisplay(), ("Hello"), 18,
> treeItem.setText(1, hi + " " + label.getText());
> How could I accomplish this?
Powered by FUDForum
. Page generated in 0.09556 seconds