Eclipse Community Forums - RDF feed
https://www.eclipse.org/forums/
Eclipse Community ForumsForcing a table to scroll horizontally
https://www.eclipse.org/forums/index.php/mv/msg/141733/446569/#msg_446569
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.]]>2004-11-26T16:36:22-00:00Re: Forcing a table to scroll horizontally
https://www.eclipse.org/forums/index.php/mv/msg/141733/446575/#msg_446575
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.
>
>]]>Veronika Irvine2004-11-26T17:27:05-00:00Re: Forcing a table to scroll horizontally
https://www.eclipse.org/forums/index.php/mv/msg/141733/446612/#msg_446612
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.