Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Standard Widget Toolkit (SWT) » How do you increase the mouse scroll wheel rate/increment in a ScrolledComposite?
How do you increase the mouse scroll wheel rate/increment in a ScrolledComposite? [message #453321] Tue, 05 April 2005 11:53 Go to next message
h1055071 is currently offline h1055071Friend
Messages: 335
Registered: July 2009
Senior Member
Hi,

I have a ScrolledComposite panel with child controls. When I use the scroll
wheel of my mouse to scroll the panel, the scroll rate is very slow with
only small increments being scrolled. Is there any way to speed things up
by increasing the increment?

Thanks.

Phil
Re: How do you increase the mouse scroll wheel rate/increment in a ScrolledComposite? [message #453324 is a reply to message #453321] Tue, 05 April 2005 12:15 Go to previous messageGo to next message
Christian Hauser is currently offline Christian HauserFriend
Messages: 189
Registered: July 2009
Senior Member
> I have a ScrolledComposite panel with child controls. When I use the scroll
> wheel of my mouse to scroll the panel, the scroll rate is very slow with
> only small increments being scrolled. Is there any way to speed things up
> by increasing the increment?

I'd use ScrollBar#setIncrement(int) like this:

private ScrollBar vBar = getVerticalBar();
// Speed up scrolling when using a wheel mouse
vBar.setIncrement(10);

Choose other values instead of 10 that better suit your needs.

HTH,
Christian
Re: How do you increase the mouse scroll wheel rate/increment in a ScrolledComposite? [message #453326 is a reply to message #453324] Tue, 05 April 2005 12:47 Go to previous message
h1055071 is currently offline h1055071Friend
Messages: 335
Registered: July 2009
Senior Member
Many thanks, that works!

Phil


"Christian Hauser" <christian.hauser@dvbern.ch> wrote in message
news:d2tvnr$psa$1@news.eclipse.org...
>> I have a ScrolledComposite panel with child controls. When I use the
>> scroll wheel of my mouse to scroll the panel, the scroll rate is very
>> slow with only small increments being scrolled. Is there any way to
>> speed things up by increasing the increment?
>
> I'd use ScrollBar#setIncrement(int) like this:
>
> private ScrollBar vBar = getVerticalBar();
> // Speed up scrolling when using a wheel mouse
> vBar.setIncrement(10);
>
> Choose other values instead of 10 that better suit your needs.
>
> HTH,
> Christian
Previous Topic:Text widget + background image
Next Topic:Java2D + Mac + SWT?
Goto Forum:
  


Current Time: Tue Dec 10 21:10:00 GMT 2019

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

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

Back to the top