Relative Content

Tag Archive for pythontkinter

Images in Tkinter Grid Layout Overlapping

Im working on a Tkinter app that displays images of cats in a grid-like layout. My goal is to place the images alternately on the left and right sides of the window, stacking them vertically. However, the images are not appearing in the expected positions.

code is written in python getting attribute error (“unsupported argument{‘0}'”.format(key))

File “C:UsersSushma MunagalaAppDataLocalProgramsPythonPython312Libsite-packagesmysqlconnector_init_.py”, line 159, in connect
return MySQLConnection(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “C:UsersSushma MunagalaAppDataLocalProgramsPythonPython312Libsite-packagesmysqlconnectorconnection.py”, line 129, in init
self.connect(**kwargs)
File “C:UsersSushma MunagalaAppDataLocalProgramsPythonPython312Libsite-packagesmysqlconnectorconnection.py”, line 449, in connect
self.config(**kwargs)
File “C:UsersSushma MunagalaAppDataLocalProgramsPythonPython312Libsite-packagesmysqlconnectorconnection.py”, line 355, in config
raise AttributeError(“Unsupported argument ‘{0}'”.format(key))
AttributeError: Unsupported argument ‘username’
PS C:UsersSushma Munagala>

Why isn’t my Tkinter scrollbar working with whole frames?

For some reason my scroll bar isn’t working. I’ve tried various methods such as using different frames and creating my own scroll function however nothing seems to work. I think it might have something to do with the packing method perhaps.

Tkinter Iterating through two dictionaries and creating a grid

I have a Python application that builds itself using a JSON file, for customization purposes. But, I realized that I have no way of dealing with overflow, and now that it has a lot of stuff it either overflows to the sides or to the bottom.
This is the code that works for small amounts of widgets, but can’t adapt.

Python Tkinter Issue When Using root.overrideredirect(True)

Alright, so I was exploring GUI libraries, specifically Tkinter, when I encountered a problem.
I was trying to make a frameless window – a window without the top bar with all the options and stuff – and the only method I found online was root.overrideredirect(1) or root.ovverrideredirect(True). Yeah, there were some reddit posts that suggested using another method that made the window end up looking like a splash screen. Tried of course, didn’t work. Visual Studio Code on Macbook Pro btw. I wanted to center the window using root.geometry, which failed and in fact made the window smaller. The window when created would stick at the top left corner of my screen.

Problem displaying multiple grids in Tkinter

I am trying to create a Tkinter GUI with multiple pages, each displaying different components mad of different widgets. I’m having trouble working with grids from different objects.