Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Standard Widget Toolkit (SWT) » Howto get out that a Table requires Scrollbars to display all items?
Howto get out that a Table requires Scrollbars to display all items? [message #452161] Mon, 14 March 2005 19:20 Go to next message
Benjamin Pasero is currently offline Benjamin PaseroFriend
Messages: 337
Registered: July 2009
Senior Member
Hi,

I am using Snippet77 (resize columns as table resizes) in order to
dynamically change the Columns of a
Table as it resizes. I am adding TableItems from a Background Thread and
as soon as a vertical Scrollbar
is required to display all items I would like to resize the columns
automatically (since now the
available vertical space was reduced by the width of the Scrollbar and a
Horizontal Scrollbar is appearing).

So, is there any Event or other way to get out that the Table is now
showing a Scrollbar? I know that
it may work by calculating the max. number of items the Table is able to
show with its current size,
but I am hoping that there maybe an easier solution?

Ben
Re: Howto get out that a Table requires Scrollbars to display all items? [message #452314 is a reply to message #452161] Thu, 17 March 2005 14:29 Go to previous messageGo to next message
Grant Gayed is currently offline Grant GayedFriend
Messages: 2150
Registered: July 2009
Senior Member
Ben,

There isn't an event fired when a scrollbar is shown/hidden, and I can't
find an easier approach than asking the Table for getClientArea() after each
item creation and detecting a width reduction.

Grant

"Benjamin Pasero" <bpasero@rssowl.org> wrote in message
news:d14o4c$vnk$1@www.eclipse.org...
> Hi,
>
> I am using Snippet77 (resize columns as table resizes) in order to
> dynamically change the Columns of a
> Table as it resizes. I am adding TableItems from a Background Thread and
> as soon as a vertical Scrollbar
> is required to display all items I would like to resize the columns
> automatically (since now the
> available vertical space was reduced by the width of the Scrollbar and a
> Horizontal Scrollbar is appearing).
>
> So, is there any Event or other way to get out that the Table is now
> showing a Scrollbar? I know that
> it may work by calculating the max. number of items the Table is able to
> show with its current size,
> but I am hoping that there maybe an easier solution?
>
> Ben
Re: Howto get out that a Table requires Scrollbars to display all items? [message #453002 is a reply to message #452161] Tue, 29 March 2005 16:35 Go to previous messageGo to next message
Steve Northover is currently offline Steve NorthoverFriend
Messages: 1636
Registered: July 2009
Senior Member
When a scroll bar is shown or hidden, the table should get SWT.Resize.
Please enter a bug report if this is not happening for you.

"Benjamin Pasero" <bpasero@rssowl.org> wrote in message
news:d14o4c$vnk$1@www.eclipse.org...
> Hi,
>
> I am using Snippet77 (resize columns as table resizes) in order to
> dynamically change the Columns of a
> Table as it resizes. I am adding TableItems from a Background Thread and
> as soon as a vertical Scrollbar
> is required to display all items I would like to resize the columns
> automatically (since now the
> available vertical space was reduced by the width of the Scrollbar and a
> Horizontal Scrollbar is appearing).
>
> So, is there any Event or other way to get out that the Table is now
> showing a Scrollbar? I know that
> it may work by calculating the max. number of items the Table is able to
> show with its current size,
> but I am hoping that there maybe an easier solution?
>
> Ben
Re: Howto get out that a Table requires Scrollbars to display all items? [message #453078 is a reply to message #453002] Wed, 30 March 2005 10:46 Go to previous message
Benjamin Pasero is currently offline Benjamin PaseroFriend
Messages: 337
Registered: July 2009
Senior Member
See https://bugs.eclipse.org/bugs/show_bug.cgi?id=89483

>When a scroll bar is shown or hidden, the table should get SWT.Resize.
>Please enter a bug report if this is not happening for you.
>
>"Benjamin Pasero" <bpasero@rssowl.org> wrote in message
>news:d14o4c$vnk$1@www.eclipse.org...
>
>
>>Hi,
>>
>>I am using Snippet77 (resize columns as table resizes) in order to
>>dynamically change the Columns of a
>>Table as it resizes. I am adding TableItems from a Background Thread and
>>as soon as a vertical Scrollbar
>>is required to display all items I would like to resize the columns
>>automatically (since now the
>>available vertical space was reduced by the width of the Scrollbar and a
>>Horizontal Scrollbar is appearing).
>>
>>So, is there any Event or other way to get out that the Table is now
>>showing a Scrollbar? I know that
>>it may work by calculating the max. number of items the Table is able to
>>show with its current size,
>>but I am hoping that there maybe an easier solution?
>>
>>Ben
>>
>>
>
>
>
>
Previous Topic:Linking button to help plugin !!
Next Topic:Handle of Workspace and Project - Problem.
Goto Forum:
  


Current Time: Tue Oct 22 11:55:42 GMT 2019

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

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

Back to the top