[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Newsgroup Home]
|
[news.eclipse.platform.swt] Re: Controls on ScrolledComposite 'guzzles' events
|
I tested your code and after clicking the "freeze" button, scrolling still
works fine for me. But..
You might want to take a look at the ScrollWheel events added in 3.1M4+ that
allow you to listen to the scrollwheel. Some controls on a scrollable canvas
will not scroll the canvas, (some for good reason, such as textareas with
their own scrollbars). But then you at least have the option to scroll your
canvas when ScrollWheel events happen on controls that would normaly not
transfer scroll events to the scrollbars of the canvas.
Hope that helps.
Emil
"Adam Pordzik" <adresseverbummelt@xxxxxx> wrote in message
news:d56gsh$9o4$1@xxxxxxxxxxxxxxxxxxx
> Adam Pordzik schrieb:
>>> I've putted some Controls (Labels/Buttons) inside a ScrolledComposite/
>>> Composite-pair. As long as the mouse cursor is e.g. directly over the
>>> scroll-bar everything is fine, but when I roll the MouseWheel and the
>>> Cursor is positioned above a control, scrolling stops. :-/
>>
>> Hello,
>>
>> I could narrow the effect down to preceding Controls within a Layout: If
>> you leave "Button malicious1" in my following example untouched,
>> mentioned effect will occour. If you delete line containing "Button
>> malicious1" everything will work correctly as expected (see Snippet5 from
>> dev.eclipse.org).
>>
>> It would be nice, if someone can confirm this bug. (At least I consider
>> this as a bug, but hopefully I just did something wrong)
>>
>
> Or even easier to reproduce within Snippet166 by placing:
>
> "final Button btn = new Button (shell, SWT.PUSH);"
>
> between the lines:
>
> "shell.setLayout(new FillLayout()); // place"
>
> and
>
> "final ScrolledComposite scrollComposite = new ScrolledComposite (
> shell, SWT.V_SCROLL | SWT.BORDER);"
>
>
> A
>
> --