dimanche 19 juin 2016

Python Tkinter using frame and canvas


I am trying to use Tkinter to present an image then, when clicked or when a key is pressed, change to another image. I have been able to make images using canvas and process clicks and key events using frame but I cannot figure out how to either use both at the same time or use one to do both of these things. Any assistance in this would be great.

Also, my image consists of only black and white pixels. I have been drawing this image using canvas by drawing zero by zero rectangles at specific spots on the screen. Of course this is a horrible way to draw something but I can't figure out a more direct way to control the pixels. Also, I cannot read the picture from a normal file as I have it stored as a string of 1's and 0's. If I could have help with this as well that would be great too.

Thanks very much!


Aucun commentaire:

Enregistrer un commentaire