Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Nebula » Grid selection background color when not in focus
Grid selection background color when not in focus [message #47074] Fri, 18 January 2008 20:39 Go to next message
Ryan Norris is currently offline Ryan NorrisFriend
Messages: 18
Registered: July 2009
Junior Member
I'm converting from Table to Grid and noticed a difference in the color of
selection background when the control loses focus. In the Table, the
selection color changes from blue to gray (on my machine). In the Grid, the
selection color stays the same regardless of focus. Is there a setting to
turn this behavior on? Do I have to try to manage the background colormy
self via a listener? Is this a bug?

I am using the Grid in multiple views in an RCP application. It's obvious
that Table is losing focus when I activate a different view, however, that's
not the case with Grid and presents a usability problem for our users.

Thanks,
-Ryan Norris
Re: Grid selection background color when not in focus [message #47533 is a reply to message #47074] Sun, 27 January 2008 14:51 Go to previous message
Chris Gross is currently offline Chris GrossFriend
Messages: 253
Registered: July 2009
Senior Member
Hi Ryan,

Grid does not have this behavior. SWT currently doesn't provide a color
that corresponds to the unfocused selection color. I've added an SWT
feature request here:
https://bugs.eclipse.org/bugs/show_bug.cgi?id=216700

You can't easily change this color yourself. You could do this if you
wrote your own cell renderer but (depending on your grid) its not a
particularly easy task. Also, you would have to hard code some
unfocused color that would work for you until SWT adds the system color
lookup.

Regards,
-Chris

Ryan Norris wrote:
> I'm converting from Table to Grid and noticed a difference in the color of
> selection background when the control loses focus. In the Table, the
> selection color changes from blue to gray (on my machine). In the Grid, the
> selection color stays the same regardless of focus. Is there a setting to
> turn this behavior on? Do I have to try to manage the background colormy
> self via a listener? Is this a bug?
>
> I am using the Grid in multiple views in an RCP application. It's obvious
> that Table is losing focus when I activate a different view, however, that's
> not the case with Grid and presents a usability problem for our users.
>
> Thanks,
> -Ryan Norris
>
>
Re: Grid selection background color when not in focus [message #587966 is a reply to message #47074] Sun, 27 January 2008 14:51 Go to previous message
Chris Gross is currently offline Chris GrossFriend
Messages: 471
Registered: July 2009
Senior Member
Hi Ryan,

Grid does not have this behavior. SWT currently doesn't provide a color
that corresponds to the unfocused selection color. I've added an SWT
feature request here:
https://bugs.eclipse.org/bugs/show_bug.cgi?id=216700

You can't easily change this color yourself. You could do this if you
wrote your own cell renderer but (depending on your grid) its not a
particularly easy task. Also, you would have to hard code some
unfocused color that would work for you until SWT adds the system color
lookup.

Regards,
-Chris

Ryan Norris wrote:
> I'm converting from Table to Grid and noticed a difference in the color of
> selection background when the control loses focus. In the Table, the
> selection color changes from blue to gray (on my machine). In the Grid, the
> selection color stays the same regardless of focus. Is there a setting to
> turn this behavior on? Do I have to try to manage the background colormy
> self via a listener? Is this a bug?
>
> I am using the Grid in multiple views in an RCP application. It's obvious
> that Table is losing focus when I activate a different view, however, that's
> not the case with Grid and presents a usability problem for our users.
>
> Thanks,
> -Ryan Norris
>
>
Previous Topic:[CompositeTable] Version 0.9.3 released
Next Topic:Grid header text wrapping
Goto Forum:
  


Current Time: Wed Nov 26 11:47:50 GMT 2014

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

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