Re: Frame button binding

Vasilis Vlachoudis <[email protected]>
Newsgroups gmane.comp.python.tkinter
Message-ID <[email protected]>
BTW is there a method to get back from Tkinter which function is binded for a message?


________________________________________
From: Tkinter-discuss [[email protected]] on behalf of Michael Lange [[email protected]]
Sent: Wednesday, September 07, 2016 22:47
To: [email protected]
Subject: Re: [Tkinter-discuss] Frame button binding

Hi,

On Wed, 7 Sep 2016 14:01:19 +0000
Vasilis Vlachoudis <[email protected]> wrote:

> Until now I had the scrollbar working which is not very elegant vs the
> Mouse Wheel or middle mouse drag. Everything started in a new
> application I was doing for RPi as a home server that uses full screen
> with no scrollbar and acts on gestures. But I wanted it general so that
> my other programs could benefit of it.
>
> What if I bind the toplevel on a static method of the ScrollFrame only
> once by keeping a list of registered scrollframes, and then I check if
> the hit location is inside any of the ScrollFrames.
>
> Is there any fast method to see if a point event.x_root, y_root is
> inside a widget or do I have to make the comparison with the winfo_xxx
> () information

Shouldn't simply using event.widget in the callback be the easiest
way to check which frame (resp. child widget) was clicked?

Regards

Michael


.-.. .. ...- .   .-.. --- -. --.   .- -. -..   .--. .-. --- ... .--. . .-.

Blast medicine anyway!  We've learned to tie into every organ in the
human body but one.  The brain!  The brain is what life is all about.
                -- McCoy, "The Menagerie", stardate 3012.4
_______________________________________________
Tkinter-discuss mailing list
[email protected]
https://mail.python.org/mailman/listinfo/tkinter-discuss
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.