Python tkinter how to add window tabs 📑

Поделиться
HTML-код
  • Опубликовано: 27 окт 2024

Комментарии • 42

  • @BroCodez
    @BroCodez  4 года назад +24

    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()

  • @CSBAjay
    @CSBAjay 3 года назад +4

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

  • @elevendarter112
    @elevendarter112 Год назад +1

    Cool. Directly to the point.

  • @joeri29
    @joeri29 2 года назад +1

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

  • @monwil3296
    @monwil3296 4 года назад +6

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

    • @BroCodez
      @BroCodez  4 года назад +1

      Thanks for the support Mon Wil!

  • @OrhanAhmedov-h7z
    @OrhanAhmedov-h7z Год назад

    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

  • @doriandoesstuff
    @doriandoesstuff 2 года назад +1

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

  • @ThearaRem
    @ThearaRem 3 года назад +2

    It helped for my small project. Thanks!

  • @truquichan
    @truquichan Год назад +1

    Great,,

  • @codeitaday
    @codeitaday 2 года назад +1

    thanks a lot! I feel excited while using this function

  • @tatyana9974
    @tatyana9974 2 года назад +1

    Once again, a great tutorial. Thanks bro!

  • @percussion1999
    @percussion1999 3 месяца назад

    Nice sir❤

  • @SanjayRaut-l4v
    @SanjayRaut-l4v 7 месяцев назад

    Good video

  • @channelparadize5972
    @channelparadize5972 3 года назад +1

    You are awesome teacher

  • @lehereinmusicalgroup1206
    @lehereinmusicalgroup1206 3 года назад +4

    could u explain how to add images in different tabs?

  • @Complex2.0GameR
    @Complex2.0GameR Год назад +1

    You are legend bro

  • @beingzero7541
    @beingzero7541 2 года назад +2

    AMAZING!!!

  • @PhG1961
    @PhG1961 2 года назад

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

  • @RARYAMEHD
    @RARYAMEHD 11 месяцев назад

    i like this this is very intersting]

  • @bartekgrechuta7691
    @bartekgrechuta7691 Год назад

    Good tutorial🙂

  • @umairrasool9113
    @umairrasool9113 3 года назад +1

    thanks sir this is really helpful

  • @TheF22raptorang
    @TheF22raptorang 2 года назад

    Thank you very much
    I find it long time
    Love you

  • @sneaky_3099
    @sneaky_3099 3 года назад

    Bro why are you so good

  • @hydarhydar2338
    @hydarhydar2338 21 день назад

  • @uuhju7004
    @uuhju7004 3 года назад

    nice

  • @umairrasool9113
    @umairrasool9113 3 года назад +1

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

  • @shahzodsayfiddinov9510
    @shahzodsayfiddinov9510 3 года назад +1

    Thank you Bro!

  • @AlekseyPokotilov
    @AlekseyPokotilov 2 года назад

    thnaks, man!

  • @creative460
    @creative460 3 года назад

    Great!

  • @raffaelschellenberg4724
    @raffaelschellenberg4724 Месяц назад

    thanks a lot

  • @alexoriginals
    @alexoriginals 6 месяцев назад

    Thanks Bro

  • @fajrulfalah93
    @fajrulfalah93 Год назад

    Thank you

  • @cahyakomara1468
    @cahyakomara1468 7 месяцев назад

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

  • @lichtblade1375
    @lichtblade1375 Год назад

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

  • @Jacob-c3p
    @Jacob-c3p 2 года назад

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

  • @vfgrfbgrb
    @vfgrfbgrb 2 года назад

    It seems better than c#

  • @Giodidthat
    @Giodidthat 2 года назад

    What about commands in the widget

  • @cursedpoptart
    @cursedpoptart 3 года назад

    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?

  • @ruchigoel3242
    @ruchigoel3242 Год назад

    now I can make a unliimited tabs

  • @hawraaalmayahi6137
    @hawraaalmayahi6137 Год назад

    Hello, its telling me to define frame

  • @jhassee
    @jhassee Год назад

    Beefy