Tkinter - Pack and Grid (ttk widgets)

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

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

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

    Wow, great explanation 👏

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

    this helped a lot .Thanks

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

      Glad it helped! Thanks for watching.

  • @seifel-darageely3481
    @seifel-darageely3481 Год назад

    I have a huge project using TKinter, will it be available to give me some help as an item of advice when I can't move forward?

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

    What is the pupose of creating main_frame?
    Why not to put the smaller frames into root?

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

      It's optional. I like to use a main frame to cover the window so that if I decide to add padding around the window (on all 4 sides), I then just need to apply padding to the main frame and not individual smaller frames. The video mentions this topic at 32:56

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

    Why can't we use grid() and pack() method on one root,master window it gives error

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

      Hello. If 2 widgets have the same parent, those 2 widgets can use pack() or grid(), but not pack and grid together. That's just the way Tkinter is designed. They are two different geometry managers. You can, however, use multiple frames and put widgets inside them. The widgets inside those frames can use a different geometry manager. For example: if Frame1 contains Button1 and Button2, and Frame2 contains Button3 and Button4, then Button1 and Button2 can use .pack(), while Button3 and Button4 can use .grid().

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

      @@jobinpy great explanation. Thanks

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

    Which IDE is this?

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

      Hi Aaron, in this video I was using Wing IDE. Thanks for watching.