Showing posts with label Tkinter. Show all posts
Showing posts with label Tkinter. Show all posts

Monday, April 28, 2008

PyToolkit:: the hybrid pygame and Tkinter module

Finally, after two hard months... or at least busy months, I have finished my forst complete version of PyToolkit.py. This was created to circumvent the issue that occurs when trying to use pygame and Tkinter in the same program. You are free to download it at:

PyToolkit_8.4.0 (source code)

PyToolkit_8.4.0 (Windows Installer)

Please post any comments/questions you may have about this library. The pytk_help.py file is designed to give you a sample run through of how each class works. more to come later.

.:Sween:.

Friday, February 1, 2008

Widget Class

So you're programming a game or doing something using pygame. You have need to input a string so you can perhaps save a file or enter your new high score. How does one do this without using input or raw_input? Well if you have knowledge of the Tkinter library and the widgets it provides you may also know that it seems difficult to make Tkinter work with pygame (or at least that is my experience... maybe I just don't know how to focus a Tkinter widget). I have started work on some widgets like Entry and Label and Button. It uses pygame to draw the widget and the class for each of these has parameters that are defaults but it requires the class to be called with screen and background instances, which isn't a huge deal, it's just helpful to know.


UPDATE


I have updated my widget.py file to include buttons and a label. Go here to see the new and improved version. There will be regular updates as Idubug and meticulously include more features. I may just limit this library to Entry, Button and Label until such a time as I need more things like menus and such.

.:Sween:.