tkinter

Tkinter: share single Frame accross multiple tabs (or dynamically reparent)

Tkinter: share single Frame accross multiple tabs (or dynamically reparent) Question: I have tkinter.Notebook that contains multiple tabs. I have tkinter.Frame "run box" with set of controls, that I want share across several tabs. Specifically Test info and Test list should have it. Currently I duplicate entire "run box" into each tab that needs it. …

Total answers: 1

Switching values of tk.call() and ttk.Style().theme_use()

Switching values of tk.call() and ttk.Style().theme_use() Question: I have the following function that supposed to switch the theme of my GUI, but I’m dealing with a small issue. The theme switches the first time CheckButton pressed. But trying it again getting the following errors: _tkinter.TclError: Theme forest-light already exists and: _tkinter.TclError: Theme forest-dark already exists …

Total answers: 1

Using Tkinter's askopenfilename() with matplotlib not working in GUI

Using Tkinter's askopenfilename() with matplotlib not working in GUI Question: I am creating a GUI for my program and I would like the first step be that the user selects an image, which is then displayed on the GUI. The program works if I put a file path directly into it, but when I use …

Total answers: 1

Tkinter Treeview has an index column too wide, and it cannot be resized

Tkinter Treeview has an index column too wide, and it cannot be resized Question: I’ve been working on a Tkinter app for a while, and a part of it is a Treeview widget that displays data. I managed to mash up some code I found because I have almost zero experience with Treeview, and it …

Total answers: 1

Combobox not displaying (Tkinter)

Combobox not displaying (Tkinter) Question: Im trying to use a combobox in my program. To simplify my program, my main window uses an image as a background, and my buttons and entry boxes I wont include since they arent relavent. The code for my main window is: from tkinter.ttk import Combobox from tkinter.ttk import * …

Total answers: 1

Tkinter UI Hierarchy (Facing issue with notebook adjustment on tkinter window)

Tkinter UI Hierarchy (Facing issue with notebook adjustment on tkinter window) Question: I am building an desktop app whose screenshot is attached below. In this image you can see i am facing issue. when I am creating a notebook widget in tkinter it comes below the labels first it was not showing me on right …

Total answers: 1

grid_forget() not working with classes acting as Frames

grid_forget() not working with classes acting as Frames Question: Right so, I have been making this goofy clock app in order to further my skills in programming, especially by adding an object oriented approach. I have defined a main menu of which is under main() but I use classes to act as Frames for the …

Total answers: 1

Python code doesn't execute. exiting code 0

Python code doesn't execute. exiting code 0 Question: i am on a project about square puzzle but my program is not responding to execution call.its about a simple square puzzle game with highest score feature. i have written this code but i cant run it. exiting with code 0 but did not showing anything on …

Total answers: 1

TkinterDnd.Tk() event.data format

TkinterDnd.Tk() event.data format Question: When using TkinterDnd.Tk() to drop external files into the tk window, the event argument from the handler function has the paths of the files on a single string, separated by whitespaces. def handle_drop(event): paths = event.data.strip() drop_zone.dnd_bind(‘<<Drop>>’, handle_drop) So by adding .split() to paths, I get them individually. But my problems …

Total answers: 1