[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Newsgroup Home]
|
[news.eclipse.platform.swt] Re: scroll speed
|
That's (almost) the correct way to do it, except those two lines should not
be inside the listener, but outside, as they only need to be set once.
Emil
"MateuY" <mateu.yabar@xxxxxxxxxx> wrote in message
news:g0uqgp$bou$1@xxxxxxxxxxxxxxxxxxxx
> Ok, I've found the solution:
>
> scrolledComposite.addControlListener(new ControlAdapter() {
> public void controlResized(ControlEvent e) {
> Rectangle r = scrolledComposite.getClientArea();
> scrolledComposite.setMinSize(displayCompo.computeSize(r.width,
> SWT.DEFAULT));
>
> //I've added this lines
> scrolledComposite.getVerticalBar().setPageIncrement(r.height);
> scrolledComposite.getVerticalBar().setIncrement(10);
> }
> });
>
>
>
> "MateuY" <mateu.yabar@xxxxxxxxxx> escribió en el mensaje
> news:g0un4o$qam$1@xxxxxxxxxxxxxxxxxxxx
>> Hi!
>>
>> I've an Swt application which uses a scrolled-composite. Inside the
>> composite, many images are displayed (you need about 10 screens to
>> visualize all of them). The scrolls works ok: I move the scroll, and more
>> images are shown. However I have a problem with the speed of the scroll.
>> What I do mean is that, for example, when I press on the white part of
>> the scroll, (not the blue part to select what are you seeing), the
>> movement that the scroll does is very small.
>> Let me put an example, in a usuall window with scroll, when you press in
>> the white part of the scroll you expect something like a "nextPage"
>> thing, you want to see the next part of the page. However, when I press
>> in this white part my composite only moves about 5 pixels.
>> The same happends when I press the arrows of the scroll. If I press the
>> bottm arrow, it will take for about 5 minutes to arrive to the end.
>>
>> Anyone knows how to change this speed? Is this speed calculated by
>> something that I'm missing?
>>
>> Thanks!
>>
>>
>
>