Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Standard Widget Toolkit (SWT) » Forcing a table to scroll horizontally
Forcing a table to scroll horizontally [message #446569] Fri, 26 November 2004 16:36 Go to next message
Eclipse UserFriend
Originally posted by: olivier.larivain.criltechnology.com

Hi,
I'm trying to implement a rectangle selection in a Table (just like the one
in the windows file explorer for example, when you drag the mouse with no
items under it), and i was wondering how i could force the table to scroll
horizontally (for when the user drags the mouse out of the client area).

I tried generating an Event (setting all fields to correct values) and
notifying a SelectionEvent to getHorizontalBar(), but that didn't seem to do
anything.
I also tried calling ScrollBar.setSelection(), it moves the scroll bar but
doesn't scroll the table (seems kind of logical though).
I search around, googlized a bit, but didn't find anything about forcing a
composite to scroll.

Since the vertical drag has been performed by using the setTopSelection
method, i'm completely running out of ideas on how i could scroll this
window.

I'd be glad if anyone could give me a clue on how to perform this.
Re: Forcing a table to scroll horizontally [message #446575 is a reply to message #446569] Fri, 26 November 2004 17:27 Go to previous messageGo to next message
Veronika Irvine is currently offline Veronika IrvineFriend
Messages: 1272
Registered: July 2009
Senior Member
Use Table.showColumn(TableColumn);

If you need more control than that, then maybe consider placing the Table in
a ScrolledComposite and use ScrolledComposite.setOrigin(Point)

"Larivain Olivier" <olivier.larivain@criltechnology.com> wrote in message
news:co7m27$vof$1@www.eclipse.org...
> Hi,
> I'm trying to implement a rectangle selection in a Table (just like the
> one
> in the windows file explorer for example, when you drag the mouse with no
> items under it), and i was wondering how i could force the table to scroll
> horizontally (for when the user drags the mouse out of the client area).
>
> I tried generating an Event (setting all fields to correct values) and
> notifying a SelectionEvent to getHorizontalBar(), but that didn't seem to
> do
> anything.
> I also tried calling ScrollBar.setSelection(), it moves the scroll bar but
> doesn't scroll the table (seems kind of logical though).
> I search around, googlized a bit, but didn't find anything about forcing a
> composite to scroll.
>
> Since the vertical drag has been performed by using the setTopSelection
> method, i'm completely running out of ideas on how i could scroll this
> window.
>
> I'd be glad if anyone could give me a clue on how to perform this.
>
>
Re: Forcing a table to scroll horizontally [message #446612 is a reply to message #446575] Mon, 29 November 2004 12:56 Go to previous message
Eclipse UserFriend
Originally posted by: olivier.larivain.criltechnology.com

Ok, thank you.
Since i'm using SWT 2.1 and Table.showColumn appeared in SWT 3.0, i'll have
to place the table
in a ScrolledComposite.

"Veronika Irvine" <veronika_irvine@oti.com> a
Previous Topic:Re: Dockable Views
Next Topic:Microsoft
Goto Forum:
  


Current Time: Fri Apr 26 15:24:58 GMT 2024

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

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

Back to the top