Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Standard Widget Toolkit (SWT) » How to Group text color
How to Group text color [message #636802] Tue, 02 November 2010 20:19 Go to next message
Ken is currently offline KenFriend
Messages: 36
Registered: July 2009
Member
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 14:21 Go to previous message
Grant Gayed is currently offline Grant GayedFriend
Messages: 2150
Registered: July 2009
Senior Member
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 Apr 26 07:50:29 GMT 2024

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

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

Back to the top