How to modify ScrollPane example2 to enable scrolling by scroll wheel?

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

How to modify ScrollPane example2 to enable scrolling by scroll wheel?

JohnReed Maffeo
Hello,
 
I can not figure out how to get scrolling by scroll wheel to work in ScrollPane example2. I have been poking around using explorer to try and figure out how the scroll wheel works in the Browser but have not discovered/recognized how it is supposed to work.
 
I have built an application based on ScrollPane example2 and it is working well, but it would be nice to get the scroll wheel to work before I get started on version 2.0. If I can get scrolling to work in the example, I think I can get it to work in my app.
 
Thanks,
 
John-Reed

_______________________________________________
Beginners mailing list
[hidden email]
http://lists.squeakfoundation.org/mailman/listinfo/beginners
Reply | Threaded
Open this post in threaded view
|

Re: How to modify ScrollPane example2 to enable scrolling by scroll wheel?

Bert Freudenberg
On 30.08.2014, at 04:14, JohnReed Maffeo <[hidden email]> wrote:

Hello,
 
I can not figure out how to get scrolling by scroll wheel to work in ScrollPane example2. I have been poking around using explorer to try and figure out how the scroll wheel works in the Browser but have not discovered/recognized how it is supposed to work.
 
I have built an application based on ScrollPane example2 and it is working well, but it would be nice to get the scroll wheel to work before I get started on version 2.0. If I can get scrolling to work in the example, I think I can get it to work in my app.

The scroll wheel actually generates keyboard events (ctrl-up/down/left/right). You need to make sure the ScrollPane gets these keyboard events. See ScrollPane>>keyStroke:. Or you could call the ScrollPane's scrollByKeyboard: method in your own key stroke handler.

- Bert -




_______________________________________________
Beginners mailing list
[hidden email]
http://lists.squeakfoundation.org/mailman/listinfo/beginners

smime.p7s (5K) Download Attachment