|
Re: setting Table font COLOR [message #444648 is a reply to message #444647] |
Tue, 19 October 2004 01:28 |
Mike Altieri Messages: 4 Registered: July 2009 |
Junior Member |
|
|
Oops I meant the color of the text, but even just being able to bold the
text would probably suffice.
Thanks,
Mike
"Mike" <mikealti@us.ibm.com> wrote in message
news:cl1q5p$ilk$1@eclipse.org...
> Hi,
>
> I am trying to change the font on a table row, is there a method that I
can
> put in my implementaion of an ITableLabelProvider class that also extends
> LabelProvider?
>
> Something along the lines of a method like below:
>
> public Label getColumnLabel(Object element, int columnIndex){
> Label columnLabel = super.getColumnLabel(element, columnIndex);
> Color color = Display.getCurrent().getSystemColor(SWT.COLOR_RED);
> columnLabel.addPaintListener(new PaintListener(){
> public void paintControl(PaintEvent event){
> event.gc.setForeground(color);
> event.gc.drawText(columnLabel.getText(), 0, 0);
> }
> });
> }
>
> I just chose the Label control since I am familiar with that control, if
> there is another control that is more suited here that would be fine too.
>
> Thanks in advance for any help,
> Mike
> mikealti@us.ibm.com
>
>
|
|
|
|
Powered by
FUDForum. Page generated in 0.03433 seconds