Tkinter Examples
Here are links to my examples using Tkinter to make graphical user interfaces (GUIs) in Python and some links to documentation on Tkinter.
- hello.py - Almost the smallest possible Tkinter example.
- hello2.py - Making a class out of the application.
- pack.py - Using pack to layout widgets
- gridexample.py - Using grid to make an array of buttons.
- scale.py - Example using a scale widget to control a Visual Python object.
- cannon.py, cannonworld.py - A more complex example controlling Vpython objects with a Tkinter GUI.
- bouncetk.py - The by-now-famous bouncing red ball with a slider to control gravity.
- intspring.py, springkutta.py - A similar example with a spring pendulum.
- minmax.py - An example of how to make a custom widget class out of three basic widgets.
Tkinter Documentation
- An Introduction to Tkinter - Probably the most complete documentation for Tkinter.
- Tkinter Documentation - The main documentation page for Tkinter at python.org.
- Tkinter reference - The PDF documentation from New Mexico Tech.
- Thinking in Tkinter - some well commented sample programs each one progressively adding one more feature than the last.