Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Standard Widget Toolkit (SWT) » set foreground color of checkbox
set foreground color of checkbox [message #453153] Wed, 30 March 2005 18:40 Go to next message
Sunil is currently offline SunilFriend
Messages: 7
Registered: July 2009
Junior Member
I am trying to change the foreground color of a checkbox button(I am
trying to change the color of the "check" inside the checkbox).

Button checkbox = new Button(shell, SWT.CHECK);
checkbox.setForeground(display.getSystemColor(SWT.COLOR_RED) );

It does not seem to have the desired effect of displaying the "check" in
red color. It always uses the default system color(black in my case).
Does anyone know how to set the checkbox foreground color?. I dont seem to
have a problem with other controls like Text or Labels.

Any help would be appreciated.

Thanks
Sunil
Re: set foreground color of checkbox [message #453159 is a reply to message #453153] Wed, 30 March 2005 20:40 Go to previous message
Steve Northover is currently offline Steve NorthoverFriend
Messages: 1636
Registered: July 2009
Senior Member
The theme manager draws the check and you can't change it. Sorry.

"Sunil" <sunil_narvekar2000@yahoo.com> wrote in message
news:5d713f0629e48f80b47a9bcf7193ab28$1@www.eclipse.org...
> I am trying to change the foreground color of a checkbox button(I am
> trying to change the color of the "check" inside the checkbox).
>
> Button checkbox = new Button(shell, SWT.CHECK);
> checkbox.setForeground(display.getSystemColor(SWT.COLOR_RED) );
>
> It does not seem to have the desired effect of displaying the "check" in
> red color. It always uses the default system color(black in my case).
> Does anyone know how to set the checkbox foreground color?. I dont seem to
> have a problem with other controls like Text or Labels.
>
> Any help would be appreciated.
>
> Thanks
> Sunil
>
>
Previous Topic:rich text investigation in 3.1 plan
Next Topic:What is SWT.MIRRORED?
Goto Forum:
  


Current Time: Thu Jul 18 01:37:00 GMT 2019

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

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

Back to the top