Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Standard Widget Toolkit (SWT) » get enabled and disabled color for a widget(text,combo...)
get enabled and disabled color for a widget(text,combo...) [message #465706] Tue, 20 December 2005 09:37 Go to next message
Michael Seele is currently offline Michael SeeleFriend
Messages: 124
Registered: July 2009
Senior Member
hi,
i need the enabled and disabled default background color of some
widgets(text, combo)! how can i got the right colors?

thx mseele
Re: get enabled and disabled color for a widget(text,combo...) [message #465709 is a reply to message #465706] Tue, 20 December 2005 10:18 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: Merle.Evelyne.ordirope.com

Try

Color bg = Display.getDefault().getSystemColor(SWT.COLOR_WIDGET_BACKGRO UND);

Color fg = Display.getDefault().getSystemColor(SWT.COLOR_WIDGET_FOREGRO UND);

bg and fg are system colors, you don't have to dispose them after using
them.


"Michael Seele" <mseele@guh-software.de> a
Re: get enabled and disabled color for a widget(text,combo...) [message #465713 is a reply to message #465709] Tue, 20 December 2005 11:58 Go to previous messageGo to next message
Michael Seele is currently offline Michael SeeleFriend
Messages: 124
Registered: July 2009
Senior Member
> Color bg = Display.getDefault().getSystemColor(SWT.COLOR_WIDGET_BACKGRO UND);

when i do this for the text widget under winXP i got the disabled
background color!
where do i get the enabled background color?
why do i get the disabled background color by SWT.COLOR_WIDGET_BACKGROUND?
Re: get enabled and disabled color for a widget(text,combo...) [message #465718 is a reply to message #465713] Tue, 20 December 2005 12:55 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: friederich.kupzog.de

Hi Michael,

the background color of a text widget can be retrieved using
SWT.COLOR_LIST_BACKGROUND.

COLOR_WIDGET_BACKGROUND is the color of empty shell spaces (usually
gray) and therefore similar to the backgound color of an disabled text
widget.

Hope that helped,
Friederich

Michael Seele wrote:
>> Color bg =
>> Display.getDefault().getSystemColor(SWT.COLOR_WIDGET_BACKGRO UND);
>
>
> when i do this for the text widget under winXP i got the disabled
> background color! where do i get the enabled background color? why do i
> get the disabled background color by SWT.COLOR_WIDGET_BACKGROUND?
>


--
Friederich Kupzog
Elektronik & Software
Neusser Str. 5-7
50670 Köln
Tel +49 241 9979356
Fax +49 221 726670
www.kupzog.de/fkmk
Re: get enabled and disabled color for a widget(text,combo...) [message #465793 is a reply to message #465718] Tue, 20 December 2005 15:33 Go to previous message
Michael Seele is currently offline Michael SeeleFriend
Messages: 124
Registered: July 2009
Senior Member
Is this also the default way to get the colors under linux?
Previous Topic:TableColumn.pack() causes deadlock
Next Topic:SWT widget of file import wizard
Goto Forum:
  


Current Time: Mon Dec 09 08:38:50 GMT 2024

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

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

Back to the top