Applications Google
Menu principal

Post a Comment On: Only Python

"Profiling adventures and cython - setting the stage"

4 Comments -

1 – 4 of 4
Blogger Tony said...

Viewer did not function as the event types were wrong. Finally I could get it kind of working with changing the events to

self.parent.bind("", self.mouse_down)
self.parent.bind("", self.mouse_motion)
self.parent.bind("", self.mouse_up)

9:22 AM

Anonymous Anonymous said...

didn't work for me either but based on http://www.pythonware.com/library/tkinter/introduction/events-and-bindings.htm i was able to get it to work with

self.parent.bind("", self.mouse_down)
self.parent.bind("", self.mouse_motion)
self.parent.bind("", self.mouse_up)

12:21 PM

Blogger Code Presser said...

didn't work as above; on my setup the buttons are CaseSensitive, so you may try this:

self.parent.bind("<Button-1>", self.mouse_down)
self.parent.bind("<Button1-Motion>", self.mouse_motion)
self.parent.bind("<Button1-ButtonRelease>", self.mouse_up)

PS. here on comments to display e.g. > or < characters you need to encode them...

5:28 PM

Blogger André Roberge said...

Please note that this blog post is 10 years old ... so it should not be surprising that the code would not work exactly as written anymore.

5:30 PM

Spammers: none shall pass.
You can use some HTML tags, such as <b>, <i>, <a>

Comments on this blog are restricted to team members.

You will be asked to sign in after submitting your comment.
Please prove you're not a robot