Forcing a table to scroll horizontally [message #446569] |
Fri, 26 November 2004 16:36 |
Eclipse User |
|
|
|
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 |
Veronika Irvine 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.
>
>
|
|
|
|
Powered by
FUDForum. Page generated in 0.03544 seconds