473,221 Members | 1,982 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,221 software developers and data experts.

Binding and the motion bind in Canvas in Tkinter

I put tag binds on the image inside a function, but even though I haven't called it, the tags are initiated when I start the program, and then it won't work again. I'm not quite sure why it is like this. (They aren't in the init method)

Also, I am using the motion bind to track the mouse, but all I end up with is a scattered line of dots, but it seems to be a timing issue as if I go slower, they get closer together.. Is the motion bind connected to time? Is there something I can use instead, or a way to track the cursor more often?
Nov 24 '07 #1
1 2685
bartonc
6,596 Expert 4TB
I put tag binds on the image inside a function, but even though I haven't called it, the tags are initiated when I start the program, and then it won't work again. I'm not quite sure why it is like this. (They aren't in the init method)
Hiya, dampflames. Please post a snippet of your code so that we may be able to help you get to the bottom of this.
Also, I am using the motion bind to track the mouse, but all I end up with is a scattered line of dots, but it seems to be a timing issue as if I go slower, they get closer together.. Is the motion bind connected to time? Is there something I can use instead, or a way to track the cursor more often?
Here, again, some portion of the relevant code will be very helpful for us.

Note that instructions on the use of CODE tags is on the right hand side of the page while you are posting. You may also add =python to the opening tag (as in [code=python]). Thanks.
Nov 24 '07 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

3
by: Rodrigo Benenson | last post by:
Hi, I have a weird need in tkinter. If I have a widget I can *set* a binding ..bind("<the event>", the_callback) I also can *append* a binding ..bind("<the event>", the_second_callback,...
1
by: Elaine Jackson | last post by:
Newbie. Playing with the 'turtle' module and wondering if there's a way to save the graphics you make with it. The documentation itself has nothing to say about this, nor (as far as I can tell)...
3
by: Tuvas | last post by:
I'm trying to display a picture on a Tkinter Canvas. It seems to work fine the first time that it is displayed. However, subsequent times running shows an error like this: TCLerror: Wrong #...
5
by: Dean Allen Provins | last post by:
I need to determine the size of a canvas while the process is running. Does anyone know of a technique that will let me do that? Thanks, Dean
4
by: beta | last post by:
Dear All, I am new with Python. I have question on binding. I have small pingpong application, I want to change color og the ball whenever mouse is clicked. I have theBall and changeColor...
1
by: apriebe47 | last post by:
Hello, I have created a simple canvas in Tkinter to display a number of PhotoImages, I then bind a key (in my case, <Up>) to start a loop that plays through a list of PhotoImages to make it an...
1
by: Davy | last post by:
Hi all, I have a canvas and a rectangle draw on it. Can I bind a key(e.g. UP) to the canvas and make the rectangle move up? Or shall I bind the key to rectangle(I don't think so, because it is...
1
by: nish88 | last post by:
Hi!! Actually,i am doing a simulation and i want a dot (small oval) to pop up when i click(by mouse) on the canvas. can anyone please help me or if possible give me the piece of codes to perform...
1
by: Albinoswordfish | last post by:
Right now I'm having trouble event binding an array of canvases. You see I want to create an array of canvases binding with double click, these binds call a function that take in an argument. ...
1
isladogs
by: isladogs | last post by:
The next online meeting of the Access Europe User Group will be on Wednesday 6 Dec 2023 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, Mike...
0
by: veera ravala | last post by:
ServiceNow is a powerful cloud-based platform that offers a wide range of services to help organizations manage their workflows, operations, and IT services more efficiently. At its core, ServiceNow...
0
by: VivesProcSPL | last post by:
Obviously, one of the original purposes of SQL is to make data query processing easy. The language uses many English-like terms and syntax in an effort to make it easy to learn, particularly for...
0
by: abbasky | last post by:
### Vandf component communication method one: data sharing ​ Vandf components can achieve data exchange through data sharing, state sharing, events, and other methods. Vandf's data exchange method...
2
by: jimatqsi | last post by:
The boss wants the word "CONFIDENTIAL" overlaying certain reports. He wants it large, slanted across the page, on every page, very light gray, outlined letters, not block letters. I thought Word Art...
2
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 7 Feb 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:30 (7.30PM). In this month's session, the creator of the excellent VBE...
0
by: fareedcanada | last post by:
Hello I am trying to split number on their count. suppose i have 121314151617 (12cnt) then number should be split like 12,13,14,15,16,17 and if 11314151617 (11cnt) then should be split like...
0
by: stefan129 | last post by:
Hey forum members, I'm exploring options for SSL certificates for multiple domains. Has anyone had experience with multi-domain SSL certificates? Any recommendations on reliable providers or specific...
0
by: MeoLessi9 | last post by:
I have VirtualBox installed on Windows 11 and now I would like to install Kali on a virtual machine. However, on the official website, I see two options: "Installer images" and "Virtual machines"....

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.