Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » JFace » TableViewer & scroll bars(Can't get a horizontal scroll bar to work properly)
icon5.gif  TableViewer & scroll bars [message #667472] Thu, 28 April 2011 23:34 Go to next message
SBS  is currently offline SBS
Messages: 57
Registered: January 2011
Member
I have a one column table wrapped by a TableViewer. The viewer lives inside a Composite using FillLayout. I am trying to adjust the width of the single column when needed in an attempt to get a horizontal scroll bar to appear which would facilitate scrolling to see the entire width of the column. However, no matter what width I give the column, the best I can get is a scroll bar that has a large thumb that fills up the bar so that no actual scrolling is possible.

How do I get a proper horizontal scroll bar to appear and function as desired? I have tried resizing the table itself but then the scroll bar is partially obscured.

Thanks,

-sbs
Re: TableViewer & scroll bars [message #668631 is a reply to message #667472] Fri, 06 May 2011 13:48 Go to previous messageGo to next message
Grant Gayed is currently offline Grant Gayed
Messages: 2151
Registered: July 2009
Senior Member
In a one-column table a horizontal scrollbar should be shown whenever the
column's width is wider than the table's width. If the column's width is
only slightly wider then the scrollbar thumb will fill most of the gutter;
if the column's width is much larger than the table's width then the thumb
will become smaller.

If this is not what you're seeing then you should log a bug, and provide
some means of reproducing the problem (eg.- a code snippet with the template
from http://www.eclipse.org/swt/faq.php#whatisasnippet ).

Grant


"SBS" <jturnbul@uow.edu.au> wrote in message
news:ipct2g$ljl$1@news.eclipse.org...
>I have a one column table wrapped by a TableViewer. The viewer lives
>inside a Composite using FillLayout. I am trying to adjust the width of
>the single column when needed in an attempt to get a horizontal scroll bar
>to appear which would facilitate scrolling to see the entire width of the
>column. However, no matter what width I give the column, the best I can
>get is a scroll bar that has a large thumb that fills up the bar so that no
>actual scrolling is possible.
>
> How do I get a proper horizontal scroll bar to appear and function as
> desired? I have tried resizing the table itself but then the scroll bar
> is partially obscured.
>
> Thanks,
>
> -sbs
Re: TableViewer & scroll bars [message #668632 is a reply to message #668631] Fri, 06 May 2011 13:50 Go to previous message
Grant Gayed is currently offline Grant Gayed
Messages: 2151
Registered: July 2009
Senior Member
Just to clarify, when I say column width, I don't mean the width of the
content in the column, but the width of the column itself, as set by either
TableColumn.setWidth() or TableColumn.pack().

Grant


"Grant Gayed" <grant_gayed@ca.ibm.com> wrote in message
news:iq0to3$ifa$1@news.eclipse.org...
> In a one-column table a horizontal scrollbar should be shown whenever the
> column's width is wider than the table's width. If the column's width is
> only slightly wider then the scrollbar thumb will fill most of the gutter;
> if the column's width is much larger than the table's width then the thumb
> will become smaller.
>
> If this is not what you're seeing then you should log a bug, and provide
> some means of reproducing the problem (eg.- a code snippet with the
> template from http://www.eclipse.org/swt/faq.php#whatisasnippet ).
>
> Grant
>
>
> "SBS" <jturnbul@uow.edu.au> wrote in message
> news:ipct2g$ljl$1@news.eclipse.org...
>>I have a one column table wrapped by a TableViewer. The viewer lives
>>inside a Composite using FillLayout. I am trying to adjust the width of
>>the single column when needed in an attempt to get a horizontal scroll bar
>>to appear which would facilitate scrolling to see the entire width of the
>>column. However, no matter what width I give the column, the best I can
>>get is a scroll bar that has a large thumb that fills up the bar so that
>>no actual scrolling is possible.
>>
>> How do I get a proper horizontal scroll bar to appear and function as
>> desired? I have tried resizing the table itself but then the scroll bar
>> is partially obscured.
>>
>> Thanks,
>>
>> -sbs
>
>
Previous Topic:TableViewer - How to force a table column / cell selection when the table widget is loaded
Next Topic:DeferredContentProvider with TreeViewer
Goto Forum:
  


Current Time: Fri Oct 31 18:46:07 GMT 2014

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

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