Implement Python tkinter zoom with turtle and single/double click
I am trying to draw turtle in canvas and I am also trying to implement zoom in zoom out feature with single click and double click event. When I am not trying to implement tkinter the code works absolutely fine but when I am trying to perform zoom in zoom out feature, I am unable to execute it. I would greatly appreciate any suggestions or help.
Here is my code:
Thank you.
Your program seems incomplete and structured incorrectly. Below is my minimalist example of what I believe you're trying to do. It draws a circle and then lets you use the mouse wheel to zoom it in and out:
Note that certain turtle elements, like dot()
and text generated with write()
won't zoom, they'll remain fixed. You'll need to read about the .scale()
method, and go deeper into tkinter, to potentially work around this. Or manually scale your fonts yourself.
By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.