from Tkinter import * root = Tk() root.wm_title("Case ") fm = Frame(root, width=300, height=200, bg="blue") fm.pack(side=TOP, expand=NO, fill=NONE) root.geometry("600x400") Button(fm, text="Button 1", width=10).pack(side=LEFT) Button(fm, text="Button 2", width=10).pack(side=LEFT) Button(fm, text="Button 3", width=10).pack(side=LEFT) root.mainloop()
18.14.Frame | ||||
18.14.1. | Demonstrates creating a window | |||
18.14.2. | Frame with three buttons | |||
18.14.3. | Set size of main window | |||
18.14.4. | Add button to frame | |||
18.14.5. | Bind mouse action to a method | |||
18.14.6. | Two top level windows | |||
18.14.7. | Destroy a frame | |||
18.14.8. | Set window title for main frame |