Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » JFace » Scrolling JFace viewers on a white background (Linux/GTK)
Scrolling JFace viewers on a white background (Linux/GTK) [message #538018] Fri, 04 June 2010 10:12 Go to next message
Peter Saunders is currently offline Peter Saunders
Messages: 30
Registered: July 2009
Member
I need to place a scrolling TableViewer on a Composite which has a white background. On Linux/GTK, the small gaps between the table scroll bars and the table itself do not inherit the background color of the TableViewer or of the Composite. How can I set the color of these gaps?

I have tried composite.setBackgroundMode(SWT.INHERIT_FORCE) which helps with scrolling SWT Text boxes, but also forces the text background to be white. This technique does not work for JFace TableViewers.

I am using Helios 3.6RC3.

Thanks

Peter Saunders
Re: Scrolling JFace viewers on a white background (Linux/GTK) [message #538393 is a reply to message #538018] Mon, 07 June 2010 10:22 Go to previous messageGo to next message
Grant Gayed is currently offline Grant Gayed
Messages: 2148
Registered: July 2009
Senior Member
I believe that thin line of pixels belongs to the scrollbar, so there isn't
a way to change its colour since SWT's ScrollBar class doesn't have
setBackground() api. (Even if ScrollBar did have setBackground(), it may
not be a desirable thing to use here if it also changed the background
colour of the scrollbar's gutter).

Grant


"Peter Saunders" <pts001@ymail.com> wrote in message
news:hub1kb$8ln$1@build.eclipse.org...
> I need to place a scrolling TableViewer on a Composite which has a white
background. On Linux/GTK, the small gaps between the table scroll bars and
the table itself do not inherit the background color of the TableViewer or
of the Composite. How can I set the color of these gaps?
>
> I have tried composite.setBackgroundMode(SWT.INHERIT_FORCE) which helps
with scrolling SWT Text boxes, but also forces the text background to be
white. This technique does not work for JFace TableViewers.
>
> I am using Helios 3.6RC3.
>
> Thanks
>
> Peter Saunders
Re: Scrolling JFace viewers on a white background (Linux/GTK) [message #539374 is a reply to message #538393] Thu, 10 June 2010 11:01 Go to previous message
Peter Saunders is currently offline Peter Saunders
Messages: 30
Registered: July 2009
Member
Grant Gayed wrote on Mon, 07 June 2010 10:22:

> I believe that thin line of pixels belongs to the scrollbar, so there isn't
> a way to change its colour since SWT's ScrollBar class doesn't have
> setBackground() api. (Even if ScrollBar did have setBackground(), it may
> not be a desirable thing to use here if it also changed the background
> colour of the scrollbar's gutter).

Thanks for the explanation. I'm noticing this limitation in various plugins on Linux/GTK now. It seems developers just live with it...

Peter Saunders
Previous Topic:[Fwd: Removing columns from viewers]
Next Topic:Can't make JFace TreeViewer larger
Goto Forum:
  


Current Time: Wed Apr 16 03:36:57 EDT 2014

Powered by FUDForum. Page generated in 0.07975 seconds