build multiple pages and back button in tkinter(python)

Поделиться
HTML-код
  • Опубликовано: 22 авг 2024
  • build different pages in tkinter-python and adding next and back button
    please also subscribe this channel🙂

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

  • @birbylikesfox1032
    @birbylikesfox1032 2 года назад +17

    This video was really helpful! But for people who dont want to manually add and delete all the elements of a screen one by one... You can add each screen as in "Frames". If you wanna know how, you can reply to this message.
    Thanks for the video!

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

      Me pleaseeee

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

      yes please, that'd be very helpful

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

      @@nexolec109 i will post a simple explaination with code soon,sorry for the late reply

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

      @@birbylikesfox1032 np

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

      how?? do you have a file with the example or something?

  • @SingleAAkash
    @SingleAAkash Год назад +2

    You deserve a big thanks i was in trouble with dictionary code but now u shown me a simple way to make multiple frames

  • @ArturYT-01
    @ArturYT-01 4 месяца назад +1

    BROOO, THIS VIDEO WAS SOOO GOOD, THANKS.

  • @043adibdzakwan2
    @043adibdzakwan2 Год назад +1

    Easy to understand. Thankyou

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

    You are so so so osum thank you so so so much😊😊😊😊😊👍👍👍👍👍

  • @berserklexx1
    @berserklexx1 5 месяцев назад

    big Thanks for this video i got stuck with my project and this video really helped me out

  • @ayansinha2355
    @ayansinha2355 3 года назад +9

    THIS VIDEO WAS SOOO GOOD..... IT WAS SOOOOOO EASY TO MEMORISE

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

    Thanks sir, because of you I could complete my project

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

    very good video it helped me a lot thanks from pakistan

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

    ThankYou So Much, It Was Really Help Full !

  • @sahilsharma7501
    @sahilsharma7501 3 года назад +25

    import tkinter as tk
    class FirstPage(tk.Frame):
    def __init__(self, parent, controller):
    tk.Frame.__init__(self, parent)
    self.configure(bg='blue')
    Button = tk.Button(self, text="Second", font=("Arial", 15), command=lambda: controller.show_frame(SecondPage))
    Button.place(x=650, y=450)
    class SecondPage(tk.Frame):
    def __init__(self, parent, controller):
    tk.Frame.__init__(self, parent)
    self.configure(bg='green')
    Button = tk.Button(self, text="Third", font=("Arial", 15), command=lambda: controller.show_frame(ThirdPage))
    Button.place(x=650, y=450)
    Button = tk.Button(self, text="Home", font=("Arial", 15), command=lambda: controller.show_frame(FirstPage))
    Button.place(x=100, y=450)
    class ThirdPage(tk.Frame):
    def __init__(self, parent, controller):
    tk.Frame.__init__(self, parent)
    self.configure(bg='Tomato')
    Button = tk.Button(self, text="Home", font=("Arial", 15), command=lambda: controller.show_frame(FirstPage))
    Button.place(x=650, y=450)
    Button = tk.Button(self, text="Back", font=("Arial", 15), command=lambda: controller.show_frame(SecondPage))
    Button.place(x=100, y=450)
    class Application(tk.Tk):
    def __init__(self, *args, **kwargs):
    tk.Tk.__init__(self, *args, **kwargs)
    # creating a window
    window = tk.Frame(self)
    window.pack()
    window.grid_rowconfigure(0, minsize=500)
    window.grid_columnconfigure(0, minsize=800)
    self.frames = {}
    for F in (FirstPage, SecondPage, ThirdPage):
    frame = F(window, self)
    self.frames[F] = frame
    frame.grid(row=0, column=0, sticky="nsew")
    self.show_frame(FirstPage)
    def show_frame(self, page):
    frame = self.frames[page]
    frame.tkraise()
    self.title("Application")
    app = Application()
    app.maxsize(800, 500)
    app.mainloop()

    • @CrisonHews
      @CrisonHews 3 года назад +3

      Cool

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

      Bhai isme image kaise add kare

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

      @@krohit65 Abhi yrr bhai mai game khel rha hu 😅
      Insta : @sahil_sharma_50
      Mujae msg kr do, mai vha bta deta hu thodi der baad, okay

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

      @@sahilsharma7501 bhej diya bhai bata de ab

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

      @@krohit65 haan haan

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

    THE BEST OF THE BEST! Thanks a lot. Hello from Russia)

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

      Karaso Love from Nepal From my side

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

    Good for a simple project of 2 tabs, but not multiple. Don't put functions into other functions.

  • @user-vy9el7gc5m
    @user-vy9el7gc5m Год назад

    Thank you this is very helpful. Let's say we entered "entry" - after "destroy" the data will be deleted from us.

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

    Ohhh yes this is the video i wanted 🙏.
    Thanks

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

    thanks helped me a lot

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

    This is what I needed, thank you very much!

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

    May you please also upload a copy of your code to the description, or link to some google doc with the code?

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

    justo lo que necesitaba, muy bueno

  • @call-me-potato.
    @call-me-potato. 4 месяца назад

    is it difficult to adjust screen so you avoid scrolling left to right again and again to write your code?

  • @kienphan135
    @kienphan135 3 года назад +10

    this is not a multi pages, you just change the label name

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

      No you also can add the entry or text or another button there if you want cuz i just create differents label not change the label name

  • @simply_just_better
    @simply_just_better 3 года назад +3

    How do I put a image in the background

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

    Thanks

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

    Appears to be an interesting solution. But couldn’t get any sound on this video.

  • @ShahbazAli-hi4nx
    @ShahbazAli-hi4nx 2 года назад +4

    this program isn't navigating us to another tab, its just changing the label and button.

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

      technically speaking, thats how every program does it (kind of). In programming, u tend to make things to give u the result as per expectations. How it works behind the screens is really upto you

    • @8ABSOLUTE
      @8ABSOLUTE 2 года назад

      same. I shouldnt have to destroy something. Instead it should transition. I feel theres prolly extra code that aint needed

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

    thank you so much

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

    Thanks for the video! Do you have this code anywhere?

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

    text page with the code please?

  • @Facts-ve5gd
    @Facts-ve5gd 2 года назад

    very good
    can i copy your code??

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

      thats why its a tutorial...so you can copy code 🤦‍♂️

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

    man code yourself windows activation :D

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

    How to make 3 pages

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

    So i have to destroy everything manually?;s That sucks

  • @AdityaRaj-rj6fv
    @AdityaRaj-rj6fv Год назад

    Bro source code ka download link please.🙏

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

    the font doesn't work...

  • @1Sunaaaaaa
    @1Sunaaaaaa Год назад

    self.tk.call('destroy', self._w)
    _tkinter.TclError: can't invoke "destroy" command: application has been destroyed
    how can i solve this?

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

    Destroy()

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

    No sound

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

      Check recent videos
      The old videos no sound but recent videos have sound