Skip to content
Advertisement

Tag: tkinter

Display/Update score on python using tkinter

I’m making an arcade game using tkinter GUI, that as most arcades, needs a score display on screen that updates every time the user kills an enemy (obviously). I am doing it by creating a text on a canvas, and calling a function that creates another one, but this time with the score value (Which is a global variable) updated.

NameError: global name ‘END’ is not defined

I have found this code about scrollbar is just working fine. I try to use it in my code like this: But when I ran above code, I got an error on insertion line. By the way, I tried to find documentation and a link from effbot is the closest I got but still couldn’t understand what is wrong. Answer

_tkinter TclError: can’t find package Tix

A friend sent me some Tkinter/Tix code, but it was for Python 2: I have Python 3, I have no Tix installed, and program crashes. After some searching I’ve changed the code to: Thats what I found on the internet. I have no idea if this is a right approach. But code still does no run it crashes on I

Tkinter importing without *?

In my past programming i used the following code: but someone told me that importing * was not good for many reasons but now when i want to import it says geometry not a module thing (name). and when i do: it says ‘module’ object has no attribute ‘geometry’ Can someone explain me how to import with tkinter all the

tkinter – screen width and height of secondary display?

I have a dual monitors set up (laptop screen and external monitor). My laptop screen is my primary display and external monitor is secondary. Both have different screen sizes. In my python tkinter script, i have used winfo_screenwidth() and winfo_screenheight() to detect the screen width and height so that I can set the root window to become full screen. Normally,

python pack() and grid() methods together

Im new to python so please forgive my Noob-ness. Im trying to create a status bar at the bottom of my app window, but it seems every time I use the pack() and grid() methods together in the same file, the main app window doesn’t open. When I comment out the line that says statusbar.pack(side = BOTTOM, fill = X)

Python: Tkinter: How to change the windows border color?

Every result I’ve gotten from searching this question up has to do with changing the border color for Tkinter widget’s WITHIN the main app window, or changing the background color and stuff. What I’m looking to do is actually change the windows border color itself. Which I have marked in this picture here I read some stuff concerning ‘Styles’ but

Advertisement