You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@pivot.apache.org by V SANTOSH PAVAN RAJU Bs <pa...@gmail.com> on 2013/01/07 12:28:09 UTC

how to move scrollpane in vertical direction

Hi,
In my application i have to move ScrollPane in vertical direction using
some buttonpress listeners. Is there any method that can be used to move
scrollpane in vertical direction?

-- 
Thanks & Regards
B.S.V.S.Pavan Raju.
Skype: skype_pavan1
Hyderabad.

RE: how to move scrollpane in vertical direction

Posted by "Roger L. Whitcomb" <Ro...@actian.com>.
Hi,

                There are two normal ways to do this:

Viewport.setScrollTop(x)

and

Component.scrollAreaToVisible(...)

                So, if you have a reference to the ScrollPane (subclass
of Viewport) you could scroll it a little bit by doing this:

scrollPane.setScrollTop(scrollpane.getScrollTop() + 10);

                Alternatively, if you have an area of a component
embedded inside the ScrollPane that you want to be visible, you can use
the "scrollAreaToVisible()" method.

                From what you are describing, though, it sounds like the
first method is what you need.

 

HTH,

~Roger Whitcomb

 

From: V SANTOSH PAVAN RAJU Bs [mailto:pavanraju.mca@gmail.com] 
Sent: Monday, January 07, 2013 3:28 AM
To: user@pivot.apache.org
Subject: how to move scrollpane in vertical direction

 

Hi,

In my application i have to move ScrollPane in vertical direction using
some buttonpress listeners. Is there any method that can be used to move
scrollpane in vertical direction?


 

-- 
Thanks & Regards

B.S.V.S.Pavan Raju.

Skype: skype_pavan1

Hyderabad.