Skip to content
Advertisement

Tag: user-interface

Python tkinter after method not working as expected

I’m trying to learn Tkinter module, but I can’t undestand why the after method doesn’t behave as expected. From what I know, it should wait ms milliseconds and then execute the function, but in my case the function gets executed many more time, not considering the time I write. Here’s the code: After the first 2 seconds the label starts

Creating a timer with tkinter

I am creating a GUI that needs to have timer starting from 0 and counting up every second until it reaches a limit This is the code I have right now Right now this is increasing the score each second but it does not open the GUI until the score reaches the limit. How can I make it so the

Tkinter window menu root issue

So i’m creating a chat bot inside of a tkinter gui but keep getting an error message when creating the main menu and sub menu. Any help is appreciated. Here’s the code: The error I’m getting is: main_menu=Menu(root) NameError:’Menu’ is not defined Answer Your import is import tkinter as tk. So you need to suffix every item imported from the

Toggle tkinter window visibility

I’m trying to toggle tkinter window visibility when I click p. Answer Not sure what keyboard is though I am using it is the keyboard library. Anyway you can use tkinter itself for this. Here is an example to set you up: Also keep a note that wm_attributes() and attributes() are the same.

Advertisement