-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy pathnb.py
37 lines (23 loc) · 844 Bytes
/
nb.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
from tkinter import *
import ttkbootstrap as tb
root = tb.Window(themename="superhero")
#root = Tk()
root.title("TTK Bootstrap! Notebook Tabs!")
root.iconbitmap('images/codemy.ico')
root.geometry('500x400')
my_notebook = tb.Notebook(root, bootstyle="dark")
my_notebook.pack(pady=20)
tab1 = tb.Frame(my_notebook)
tab2 = tb.Frame(my_notebook)
my_label = Label(tab1, text="My Awesome Label!", font=("Helvetica", 18))
my_label.pack(pady=20)
my_text = Text(tab1, width=70, height=10)
my_text.pack(pady=10, padx=10)
my_button = tb.Button(tab1, text="Click Me!", bootstyle="danger outline")
my_button.pack(pady=20)
my_label2 = Label(tab2, text="This Is Tab Two!", font=("Helvetica", 18))
my_label2.pack(pady=20)
# Add our frames to the notebook
my_notebook.add(tab1, text="Tab One")
my_notebook.add(tab2, text="Tab Two")
root.mainloop()