473,387 Members | 1,611 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,387 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 2694
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. ...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

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.