from Tkinter import *
root = Tk()
#root.option_readfile('optionDB')
root.title('Labels')
Label(root, text="Text ", wraplength=300, justify=LEFT).pack(pady=10)
f1=Frame(root)
Label(f1, text="Text", relief=RAISED).pack(side=LEFT, padx=5)
Label(f1, text="Text", relief=SUNKEN).pack(side=LEFT, padx=5)
f1.pack()
f2=Frame(root)
for bitmap,rlf in [('woman', RAISED),('mensetmanus',SOLID),('terminal',SUNKEN),
('escherknot',FLAT),('calculator',GROOVE),('letters',RIDGE)]:
Label(f2, bitmap='@bitmaps/%s' % bitmap, relief=rlf).pack(side=LEFT, padx=5)
f2.pack()
root.mainloop()
|