Python Tkinter - StringVar in Entry Widget and Common Mistakes

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

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

  • @i.dragons
    @i.dragons Год назад +3

    This video is 🥇 gold! Thank you for making this.

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

    Great video! It helped a lot in understanding scope within my first tkinter project. Thank you!

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

    your teaching style is deafferent I like it because of that I subscribed your channel
    plz make video on OOP with tkinter and increase the size of editor

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

    great work"!

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

    you are are amazing thanks sooooo much

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

    good job

  • @digitalmachine0101
    @digitalmachine0101 8 месяцев назад

    Good information

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

    When you set the textvariable = entryValue, why don't you have to put .get() after it? Does it automatically get the text?

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

      The answer is yes. But you should look at it differently. What you are giving to textvariable is a reference to a value that has the possibility of changing. Therefore, this means it needs a reference to it and not a function call.
      Remember that when you are using the ".get()" right after the StringVar object (entryValue) you are calling a method. textvariable is not supposed to call a method but simply is supposed to reference to the object itself. This is the most important thing to capture because when you call a method in python it executes right away. Which is not exactly the goal you are looking for rwith StringVar.
      ALSO: Notice how once we use StringVar you are not even putting a value into entryValue ? This is another hint that what I want textvariable is simply to have a connection to StringVar which in this case is pointing to the memory of the object.
      This is a hard concept to explain through a comment. I hope it helps !
      see the video at time 13:48
      It explains how this is more a matter of passing by reference.
      Thanks for commenting !

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

      I understand now. Thank you!!

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

    the font size is too small