| Revision: | 591 |
| Committed: | Tue Nov 3 22:45:12 2015 UTC (10 years, 4 months ago) by nino.borges |
| Content type: | text/x-python |
| File size: | 365 byte(s) |
| Log Message: | Moved dir out of main dir. |
| # | User | Rev | Content |
|---|---|---|---|
| 1 | ninoborges | 8 | from Tkinter import * |
| 2 | def doit(): | ||
| 3 | print "hello" | ||
| 4 | |||
| 5 | def gui(master): | ||
| 6 | top = Frame(master) | ||
| 7 | top.pack() | ||
| 8 | # the key to the command thing is to not put the () after the function call. | ||
| 9 | button = Button(top, text = "press me", command = doit) | ||
| 10 | button.pack(side=BOTTOM) | ||
| 11 | if __name__ == "__main__": | ||
| 12 | root = Tk() | ||
| 13 | gui(root) | ||
| 14 | mainloop() |