- Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathTabbedWdigets.py
More file actions
Latest commit
21 lines (15 loc) · 505 Bytes
/
Copy pathTabbedWdigets.py
File metadata and controls
21 lines (15 loc) · 505 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
importtkinterastk
fromtkinterimportttk
win=tk.Tk()
win.title('Creating tab widgets')
# Tab control introduced
tabControl=ttk.Notebook(win)
tab1=ttk.Frame(tabControl)
tabControl.add(tab1, text='Tab 1')
tab2=ttk.Frame(tabControl)
tabControl.add(tab2, text='Tab 2')
tabControl.pack(expand=1, fill='both')
monty=ttk.LabelFrame(tab1, text=' Monty Python ')
monty.grid(column=0,row=0, padx=8, pady=4)
ttk.Label(monty, text='Enter a name:').grid(column=0, row=0, sticky='W')
win.mainloop()