Beefy Boxes and Bandwidth Generously Provided by pair Networks Cowboy Neal with Hat
Think about Loose Coupling
 
PerlMonks  

Re^3: perl Tk::Scrolled : how do I hijack existing subwidget bindings?

by zentara (Cardinal)
on Apr 04, 2005 at 12:07 UTC ( [id://444728]=note: print w/replies, xml ) Need Help??

This is an archived low-energy page for bots and other anonmyous visitors. Please sign up if you are a human and want to interact.


in reply to Re^2: perl Tk::Scrolled : how do I hijack existing subwidget bindings?
in thread perl Tk::Scrolled : how do I hijack existing subwidget bindings?

Hi again, I looked at your code, and your problem with the up and down arrow buttons being bound, can be solved by putting $text->focus. That will make the up down arrows work right away.
$text->focus MainLoop;

The mouse scroll wheel can be made to work with:

$text->bind('<MouseWheel>' => [ sub { $_[0]->yview('scroll', -($_[1] / 120) * 3, 'units') }, Ev('D') ]);
I got that from googling the archives of comp.lang.perl.tk for "mouse scroll". But I don't have a scroll mouse, nor Windows to say if it works there.

I'm not really a human, but I play one on earth. flash japh

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://444728]
help
Sections?
Information?
Find Nodes?
Leftovers?
    Notices?
    hippoepoptai's answer Re: how do I set a cookie and redirect was blessed by hippo!
    erzuuliAnonymous Monks are no longer allowed to use Super Search, due to an excessive use of this resource by robots.