Tkinter - Modify Widgets From Different Classes

Поделиться
HTML-код
  • Опубликовано: 21 июл 2024
  • I'll show you how to modify widgets from different classes and different files.
    Manipulating widgets from different classes is an important technique when using Tkinter.
    0:00 Intro
    0:58 Demo application
    1:45 Start code
    2:04 Create main window class
    6:22 App so far
    7:15 Create Response class
    9:15 Submit button binding
    9:50 Import Response class
    10:57 Reference to widget
    12:51 One label with two different names
    15:27 Reference to method
    21:24 Closure
    #tkinter #tkintertutorial #python3 #pythongui
  • НаукаНаука

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

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

    This did exactly what I needed! Thank you, great video!

  • @bentsionben-david2769
    @bentsionben-david2769 Год назад +1

    I think you are the best mentor of tkinter on web, i learned and learning so much from you.. i tried to create a MainWindow class of notebook widget that will call different class of different python file by your switch frames video by treeview, but for months already unsuccessfully, please consider to make this video, i believe will be thousands of viewers at least.. 🙏🏻🙏🏻🙏🏻

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

      Thanks! Which video needs a better explanation or which part are you stuck on?

    • @bentsionben-david2769
      @bentsionben-david2769 Год назад

      @@jobinpy
      your video on
      ruclips.net/video/4hamShRNxgg/видео.html
      i can't create a new file that contains Notebook widget, that when i press any tab there then i open your "switch frames" code, i mean how do i call you switch frames from a MainFrame different python file, i failed with "__init__(self):
      super().__init__()" .. please help thanks again

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

      @@bentsionben-david2769 It's possible to pass objects from one object to another, even if the class/object is in a different file. The following video explains the steps: ruclips.net/video/UKIdEH1fY2A/видео.html

  • @bentsionben-david2769
    @bentsionben-david2769 2 года назад +1

    Wow wow wow.. nowhere videos like yours.. totally amazing, simple and informative.. 🙏🙏🙏

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

    Taking advantage of the object-oriented theme, a suggestion for your list of tkinter videos, would be how to create a class to work with configuration files.
    You can use the window parameters as an example, with an option to remember or not remember its settings when opening an app.
    remember the x,y position of the window, remember the height and width of the window, remember if the window should be opened maximized or normal

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

      That's a good suggestion. I'll add that to my list of videos to create in the future. Thanks Mrkalvin.

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

    Video content is very good.
    Thanks for sharing your knowledge!

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

      Glad you liked it!

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

    Very cool!

  • @kingmenka2085
    @kingmenka2085 4 месяца назад

    Thanks..this is cool

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

    Nice simple example that can be used for my login screen. Nice video man

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

      Glad you like it!

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

    Thank you, very useful 👍

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

      I'm glad it was helpful!

  • @Ant-up3iy
    @Ant-up3iy Год назад

    Hi Jobin. Great video. I've never seen the "->" before on the first line of a function definition. Are there any good sources you recommend for learning what it does?

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

      Hi @Ant, thanks for watching my video. The "->" is a type hint, which gives the IDE an idea as to what is expected as a return value. You can read more about it here: docs.python.org/3/library/typing.html

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

    Thanks like

  • @davoodbarzegari4080
    @davoodbarzegari4080 19 дней назад

    terrible explanation. it does not add anything to anyone. he tried to show himself rather than make an easy explanation.