Creating a Dropdown Menu in Python Tkinter: A Step-by-Step Guide

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

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

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

    I have typed the code like in the video but am getting an error NameError: name 'root' is not defined. Any ideas on why this would be? Thank you for the video!

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

      Check if you typed the code exactly, maybe it could be a typo

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

      Same, no typos he just does not show all of his code, i think you kinda need to "activate" root to make it work i have no idea.@@margor4697

    • @_-_Asher_-_
      @_-_Asher_-_ 6 месяцев назад

      Try adding root = tk.Tk() at the top of the file after imports, this should work if tkinter was imported like this: import tkinter as tk

  • @jignasajoshi27
    @jignasajoshi27 9 месяцев назад

    Done

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

    "root not defined" i wish i could download the whole code

    • @_-_Asher_-_
      @_-_Asher_-_ 6 месяцев назад

      Try adding root = tk.Tk() at the top of the file after imports, this should work if tkinter was imported like this: import tkinter as tk