Python tkinter how to add window tabs 📑

preview_player
Показать описание
Python GUI tabs notebook tkinter GUI tutorial for beginners

#Python #GUI #tabs #notebook #tkinter #GUI #tutorial #beginners
Рекомендации по теме
Комментарии
Автор

from tkinter import *
from tkinter import ttk

window = Tk()

notebook = ttk.Notebook(window) #widget that manages a collection of windows/displays

tab1 = Frame(notebook) #new frame for tab 1
tab2 = Frame(notebook) #new frame for tab 2

notebook.add(tab1, text="Tab 1")
notebook.add(tab2, text="Tab 2")
notebook.pack(expand=True, fill="both") #expand = expand to fill any space not otherwise used
#fill = fill space on x and y axis
Label(tab1, text="Hello, this is tab#1", width=50, height=25).pack()
Label(tab2, text="Goodbye, this is tab#2", width=50, height=25).pack()

window.mainloop()

BroCodez
Автор

Ur channel deserves more subscribers :), I'm glad u tube recommended it to me.

CSBAjay
Автор

thanks a lot! I feel excited while using this function

codeitaday
Автор

It helped for my small project. Thanks!

ThearaRem
Автор

im doing a clock project rn, and this video helped a lot! Thank you and keep going :)

doriandoesstuff
Автор

Once again, a great tutorial. Thanks bro!

tatyana
Автор

Brings back "Visual Basic 6" memories 😔. Bro, I'm enjoying, sorry, we're enjoying it 👏👏👏

monwil
Автор

Hi Bro, you really help me!! You talk clear and straight to the point, I like it brother!!

joeri
Автор

Thank you a lot I understand you. Because you are not like other tutors, Just do this then this cant express or explain, You are basically just pulling the routine out and why and what is used for how and why, Basically you explaining by giving optional to others. Like # Widget manages collection of windows/displays #TheBest #Amazing

mettuzb
Автор

could u explain how to add images in different tabs?

lehereinmusicalgroup
Автор

Thank you very much
I find it long time
Love you

TheFraptorang
Автор

Great !! Now, show some more interesting videos on the use of tkinter.

PhG
Автор

can I add to each tab a script like for bots and add a play or pause button?

cahyakomara
Автор

hi sir can we plot graphs inside a tab...please if we can please give an.explan..

umairrasool
Автор

it really helped me but i want to know how to make from all the things that i learned a website by myself

efrxcej
Автор

Trying to add this to my guess the number and it's opening another window... How would I add it to the same window so they can just click on the tabs?

cursedpoptart
Автор

Hi Bro, can you teach us how to add back button from Tkhinter please🥺

lichtblade
Автор

Hello, its telling me to define frame

hawraaalmayahi