[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Newsgroup Home]
|
[news.eclipse.platform.swt] Re: How do I access the color of selected table items without focus?
|
It should be reflected in the EraseItem event's GC, but I notice that it's
not on gtk, so I've logged
https://bugs.eclipse.org/bugs/show_bug.cgi?id=209977 . I don't think
there's another way to get this color.
Grant
"Jared Burns" <jaredburns@xxxxxxxxxxxxxxx> wrote in message
news:fhfnks$bsq$1@xxxxxxxxxxxxxxxxxxxx
> Is there a way to access the background color for a selected item in a
> table which doesn't have focus? This would be the light gray (on GTK)
> color which corresponds to SWT.COLOR_LIST_SELECTION.
>
> I ask because I'm implementing userdraw for a table inside a view. I am
> completely drawing over an entire row of my (single-column) table. When
> the user selects this column, I'm painting the background rectangle with
> COLOR_LIST_SELECTION, which looks good when the view has focus. But when
> focus is switched away from the view I need to update the color to the
> grayish color that regular table items get.
>
> I've tried most of the COLOR constants available on SWT, but none of
> them quite match.
>
> Thanks,
> - Jared