Skip to main content



      Home
Home » Eclipse Projects » Standard Widget Toolkit (SWT) » How to Group text color
How to Group text color [message #636802] Tue, 02 November 2010 16:19 Go to next message
Eclipse UserFriend
I cannot seem to figure out how to set the text color of a Group box.
setForground seems to do nothing.

Any ideas?

- Ken
Re: How to Group text color [message #636959 is a reply to message #636802] Wed, 03 November 2010 10:21 Go to previous message
Eclipse UserFriend
Hi Ken,

Group.setForeground() is the correct way to do this, but some platforms
don't support changing a Group's label foreground, which is likely what
you're seeing.

The only real workaround for this is to create an ON_TOP Shell at the
position of the Group's label and put some other control in it that can show
coloured text. This is probably more work than it's worth though, unless
colouring the Group labels is particularly important in your app. Or
alternatively you could create the Group with no label and just move its
text to a new Label widget within the Group which could be coloured.

Grant


"news.eclipse.org" <kennyp@avi.com> wrote in message
news:iapria$amj$1@news.eclipse.org...
>I cannot seem to figure out how to set the text color of a Group box.
>setForground seems to do nothing.
>
> Any ideas?
>
> - Ken
Previous Topic:Use Menu with Combo?
Next Topic:[SOLVED] Setting images of different widths to TableItem
Goto Forum:
  


Current Time: Fri Jul 04 15:01:29 EDT 2025

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

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

Back to the top