| Revision: | 8 |
| Committed: | Sat May 5 04:21:19 2012 UTC (13 years, 10 months ago) by ninoborges |
| Content type: | text/x-python |
| File size: | 400 byte(s) |
| Log Message: | Initial Import |
| # | 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() |