| 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: | 400 byte(s) |
| Log Message: | Moved dir out of main dir. |
| # | User | Rev | Content |
|---|---|---|---|
| 1 | ninoborges | 8 | # File: toolbar1.py |
| 2 | |||
| 3 | from Tkinter import * | ||
| 4 | |||
| 5 | root = Tk() | ||
| 6 | |||
| 7 | def callback(): | ||
| 8 | print "called the callback!" | ||
| 9 | |||
| 10 | # create a toolbar | ||
| 11 | toolbar = Frame(root) | ||
| 12 | |||
| 13 | b = Button(toolbar, text="new", width=6, command=callback) | ||
| 14 | b.pack(side=LEFT, padx=2, pady=2) | ||
| 15 | |||
| 16 | b = Button(toolbar, text="open", width=6, command=callback) | ||
| 17 | b.pack(side=LEFT, padx=2, pady=2) | ||
| 18 | |||
| 19 | toolbar.pack(side=TOP, fill=X) | ||
| 20 | |||
| 21 | mainloop() |