| ExampleCompoundButton |
UserPreferences |
| Tkinter Wiki | FrontPage | RecentChanges | TitleIndex | WordIndex | SiteNavigation | HelpContents | moin.sf.net |
The new compound options for buttons, labels and menu's means we can now display both the text and image or bitmap at the same time.
An example of a compound button:
1 2 3 4 5 6 7 | from Tkinter import *
root=Tk()
for comp in ("bottom", "center", "left", "none", "right", "top"):
b = Button(root, compound=comp, text=comp, bitmap="error")
b.pack()
root.mainloop() |