ttk widget tab

Solutions on MaxInterview for ttk widget tab by the best coders in the world

showing results for - "ttk widget tab"
Maya
05 Jun 2017
1import tkinter as tk
2from tkinter import ttk
3
4# intializing the window
5window = tk.Tk()
6window.title("TABS")
7# configuring size of the window 
8window.geometry('350x200')
9#Create Tab Control
10TAB_CONTROL = ttk.Notebook(window)
11#Tab1
12TAB1 = ttk.Frame(TAB_CONTROL)
13TAB_CONTROL.add(TAB1, text='Tab 1')
14#Tab2
15TAB2 = ttk.Frame(TAB_CONTROL)
16TAB_CONTROL.add(TAB2, text='Tab 2')
17TAB_CONTROL.pack(expand=1, fill="both")
18#Tab Name Labels
19ttk.Label(TAB1, text="This is Tab 1").grid(column=0, row=0, padx=10, pady=10)
20ttk.Label(TAB2, text="This is Tab 2").grid(column=0, row=0, padx=10, pady=10)
21#Calling Main()
22window.mainloop()
23
similar questions
queries leading to this page
ttk widget tab