Skip to main content



      Home
Home » Eclipse Projects » Standard Widget Toolkit (SWT) » button text color change(basic function help wanted)
icon5.gif  button text color change [message #505343] Tue, 29 December 2009 08:23 Go to next message
Eclipse UserFriend
Hi!

This is a very basic question. I want to change the color of the text in a SWT button in the simplest way.
I have seen there might be a eclipse bug on win32-systems where u can't change colors of a button at all. However, changing the background of my radio button to black is no problem. But I want to change to color of the text. Setforeground doesn't work. Is it suppose to, or is there another way one should do it?

Best regards
B
Re: button text color change [message #505727 is a reply to message #505343] Mon, 04 January 2010 06:54 Go to previous message
Eclipse UserFriend
Control.setForeground() is the right way to do what you want, so if it does
not work for you then it's not natively supported. Most Controls allow you
to change their foregrounds and backgrounds, but there are a few
platform-specific ones that don't.

Grant


"B" <bjorn.hagglund@gmail.com> wrote in message
news:hhdhde$bjr$1@build.eclipse.org...
> Hi!
>
> This is a very basic question. I want to change the color of the text in a
SWT button in the simplest way.
> I have seen there might be a eclipse bug on win32-systems where u can't
change colors of a button at all. However, changing the background of my
radio button to black is no problem. But I want to change to color of the
text. Setforeground doesn't work. Is it suppose to, or is there another way
one should do it?
>
> Best regards
> B
Previous Topic:tree where some items do and some items don't have check boxes?
Next Topic:Button's Background on ExpandBar not transparent
Goto Forum:
  


Current Time: Tue Jul 22 19:03:03 EDT 2025

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

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

Back to the top