Skip to main content



      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 15:39 Go to next message
Eclipse UserFriend
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 09:51 Go to previous message
Eclipse UserFriend
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 09:51 Go to previous message
Eclipse UserFriend
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: Fri May 09 13:04:50 EDT 2025

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

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

Back to the top