Skip to main content
Filter by
Sorted by
Tagged with
0 votes
0 answers
31 views

I have this code with an upload image button and an image label. import tkinter from tkinter import filedialog, Label, Button from PIL import Image, ImageTk # Functions def upload_image(): ...
Aadvik's user avatar
  • 1,522
1 vote
1 answer
112 views

I'm working on a tkinter GUI to ease the operation of some scripts that are meant to both send signals to an Allen-Bradley PLC to write tag values and also read other tags repeatedly in a logging file....
narab's user avatar
  • 29
0 votes
2 answers
135 views

Program outline: show a helpfile (PDF) on button click -> runs well But if I press the button even though the file is still open, the frontend remembers this and then opens the file as often as it ...
Microscoop's user avatar
2 votes
1 answer
141 views

i'm working on a Python application using customtkinter and CTkTable to display a paginated table with dynamic resizing and various widgets (frames, labels, buttons, comboboxes, etc.). The code below ...
Ian Kioko's user avatar
3 votes
1 answer
113 views

Why can I not show a TopLevel window after launching the FileDialog module? I would like to show a window with a waiting message after executing FileDialog code. If I create the TopLevel window before ...
Ric's user avatar
  • 31
0 votes
1 answer
89 views

I'm building a Python application using Tkinter. In the main window, I have a Canvas with a scrollable Frame inside it. Within that scrollable frame, I've added several LabelFrame widgets. Each ...
waxier358's user avatar
0 votes
1 answer
75 views

I want a frame that scrolls both ways (horizontally and vertically). However, a normal CTkScrollableFrame only supports either vertical scrolling or horizontal scrolling, and I'm not sure what other ...
Tommy Llewellyn's user avatar
3 votes
1 answer
174 views

Problem Description I'm experiencing a problem concerning font configuration in Tkinter. The constructor of all Tkinter widgets have a font keyword argument which allows you to configure the font used ...
I Like Python's user avatar
-1 votes
1 answer
122 views

my code is as follows -: import sqlite3 import pandas as pd import tkinter as tk from tksheet import Sheet from tkinter import messagebox # Connect to SQLite database conn = sqlite3.connect("...
Brian McGill's user avatar
1 vote
1 answer
77 views

I always thought that only frame and other container elements can be parent, but recently when I tried the below code, it seemed to work perfectly without any error. import os import tkinter as tk ...
Art's user avatar
  • 3,161
0 votes
1 answer
106 views

I'm working on a script to collate information from a few utilities and applications. The last part I'm trying to finish up is to take color information and apply it to a table. My issue is that ...
Loren Zimmer's user avatar
0 votes
2 answers
91 views

I'm trying to build a Tkinter form in Python that has three "frames": a narrow frame across the top (for a title), a thin frame down the left (for buttons), and a main frame (to show content)...
Boulder Keith's user avatar
0 votes
0 answers
79 views

I have a Tkinter project app, but the filedialog.askopenfilename and other file dialog functions show a strange file explorer, as shown in the screenshot. If I open a file dialog before initializing ...
user26267931's user avatar
0 votes
0 answers
141 views

I am using Python 3.11 on Windows. The code below creates this window: I want to be able to resize the main window with these contraints: The dark area must always be a square The light green area ...
Mike Duke's user avatar
  • 235
1 vote
1 answer
59 views

My application uses CustomTkinter and reads data on start up: import customtkinter as ctk from CTkMessagebox import CTkMessagebox class App(ctk.CTk): def __init__(self) -> None: super()....
Daniel O'Hara's user avatar
0 votes
1 answer
60 views

I've discovered the Tkinter Text widget, used with the grid manager. I successfully created a table and populated it with a numpy array. Now I'm trying to figure out how to retrieve the edited ...
jeffery_1965's user avatar
0 votes
1 answer
98 views

I am using Python 3.11 on Windows. I don't understand the behaviour of winfo_geometry(), winfo_height(), winfo_x(), etc. Here is my code: import tkinter as tk from tkinter import ttk class ...
Mike Duke's user avatar
  • 235
1 vote
0 answers
38 views

This is a follow up question from Calling ImageTk.PhotoImage() in a thread causing deadlock I have so far fixed the deadlock issue following the design in the accepted answer. Now I am working on a ...
Anthony's user avatar
  • 3,863
0 votes
0 answers
38 views

Hy there, im pretty new in python and facing a problem, i cant find the answere. When receiving a path from tkinters filedialog.askdirectory, the path is "normcase" but i need to receive it ...
Ilu's user avatar
  • 1
1 vote
1 answer
70 views

I am using Tkinter with Python 3.11 on Windows. The following program creates a simple window with a menu. The user would click "Game -> Select game directory", whereupon ...
Mike Duke's user avatar
  • 235
2 votes
1 answer
60 views

I'm working on a project to design a chessboard. I have successfully created the board. My goal is to edit the board. My original idea is to use buttons with the Tkinter grid to make the moves work. I ...
Kian's user avatar
  • 23
0 votes
1 answer
82 views

Here is my code --> import tkinter as tk from tkinter import ttk win = tk.Tk() WIDTH, HEIGHT = 500, 500 win.geometry(f"{WIDTH}x{HEIGHT}") text = tk.Text(win, height=5, width=10) text....
Ashaz Akhtar's user avatar
0 votes
1 answer
55 views

I have a button function that uses filedialog.askopenfilename to read data from xls, xlsx, dpt, xy, and txt file types into a pandas dataframe. When I use the button and open anything other than xls ...
TPoirier's user avatar
0 votes
0 answers
51 views

I'm working on a Tamagotchi-like app in Python with Tkinter. I detect clicks on a canvas item and increment a "clicks" counter stored in a JSON-backed character object. When the clicks reach ...
coco Fox's user avatar
2 votes
0 answers
66 views

I was trying to make a subclass that acts like the original but its go function returned the string of the text of the button, instead of the index of the button. My own defined subclass makes the ...
Randumb_ASH's user avatar
1 vote
1 answer
61 views

I have a script when I run it through idle shell the tkinter Buttons/Checkbox look as I would expect, however when I run the same script through the terminal the Buttons/Checkbox appear as though they ...
Jesse Brooker's user avatar
0 votes
1 answer
46 views

The following Python code generates a list box and text widget. When I select an option, the cursor should show in the text widget but it does not. However, if I press Tab, the text widget is ...
Daniel Louw's user avatar
2 votes
1 answer
126 views

I have an example Python program that sets the text of a tkinter label, and the use of Label.config(text=string) is leaking memory. Other techniques for setting the text don't. Is something wrong here?...
KeithS's user avatar
  • 143
1 vote
0 answers
56 views

I'm having a problem building a kiosk display system using Python, Tkinter and VLC. In my setup, everything is latest version(only got the Pi 2 weeks ago). -RPI 5 with latest Bookworm 64 bit. -Python-...
alw1746's user avatar
  • 11
0 votes
1 answer
77 views

I am coding minesweeper in python turtle. I have made it generate 10x10 button layout using this script: position_x = -400 position_y = -200 number_colum = 0 rows_buttons = [] for i in range(10): ...
Charles Wiewiora's user avatar
1 vote
0 answers
47 views

I want to create a class for a Tk.Button in a Tk.Frame so that the button can have a border color independent of its background color. I wrote this code import tkinter as tk class FramedButton(tk....
user1069353's user avatar
0 votes
2 answers
123 views

I want to create a class for a Tk.Button in a Tk.Frame so that the button can have a border color independent of its background color. I wrote this code which creates a button in a frame just as I ...
user1069353's user avatar
0 votes
0 answers
155 views

In tksheet I have a table with fixed hight and width. When I enter text and it is too long the cell extends (during the edit) downwards to show me all the text I put in. After the edit only the ...
Flx's user avatar
  • 41
0 votes
1 answer
57 views

I have added a music button to my Tkinter GUI, when I press it, it plays music but the other aspects wont work such as clicking other buttons and moving the window, I have tried threading but still no ...
Ac1234's user avatar
  • 1
0 votes
1 answer
54 views

I wrote this silly program in python using tkinter where I show a stickman being hit on the head with a hammer by using a button event to change the label's image to the picture showing the stickman ...
Hoen's user avatar
  • 1
0 votes
1 answer
68 views

I'm creating a custom text widget using tk.Canvas in Tkinter to display multiple lines of text, with support for mousewheel and scrollbar scrolling. What works: Mouse wheel scrolling scrolls through ...
Coder's user avatar
  • 92
0 votes
0 answers
61 views

I am working on a GUI plotting tool and need to split the contents of one matplotlib Figure object across two tkinter FigureCanvasTkAgg objects. In a previous iteration, I accomplished this by placing ...
z_on_ovf's user avatar
1 vote
1 answer
54 views

I'm trying to bind CTRL + Right click to a matplotlib FigureCanvasTkAgg. So far, I used mpl_connect to change the state of a ctrl variable when the key is pressed and then checked if it was True when ...
Nevpzo's user avatar
  • 187
2 votes
2 answers
321 views

I have an existing open window, created by SDL 2 in C/C++. I would like the process to call a python script (using Boost/Python) to add some GUI elements to it. Here's a non-working example: import ...
Roy Falk's user avatar
  • 1,729
0 votes
0 answers
107 views

I'm trying to set up some Python scripts to do some file manipulation and I was trying tkinter after some googling of libraries to use. The following only half works: from tkinter import filedialog ...
Keronin's user avatar
  • 11
0 votes
1 answer
60 views

I have a simple script that uses tkinterweb to display a search result that is stored as html. When I try to bind the search function to the Enter key using the "button.bind('',function())" ...
PKovitch734's user avatar
2 votes
1 answer
86 views

I am working on a camera applicaiton where I need to get images from camera buffer and display it in a TK label live: def display_thread_run(self): while self.is_acquiring: image_data = ...
Anthony's user avatar
  • 3,863
3 votes
2 answers
239 views

I'm new to coding/Python started a few weeks ago and am learning by creating a basic app with Customtkinter (for the aesthetic) on Pycharm. The app has 2 Customtkinter windows, a login window (class ...
Suraj Satish 's user avatar
0 votes
1 answer
122 views

I'm using Python, Tkinter in PyCharm. This is a movie tracker program. It tracks movies I want to watch and have watched. There is a listbox in a frame on the left that contains the titles of movies. ...
SkellyCA's user avatar
2 votes
0 answers
106 views

I'm developing an accessibility application using Python and Tkinter where I need to use PyInstaller's --uac-uiaccess flag to ensure proper access to UI automation features. The Problem When I compile ...
user2992757's user avatar
0 votes
1 answer
53 views

The following code enables the status bar to remain at the bottom of the window and expand to fill the window when the window is resized. How can I replace pack() with grid() to do the same thing? ...
bob_the_bob's user avatar
0 votes
0 answers
54 views

I use python 3.13.3 on a macbook air M1 (2020) with Sequoia 15.5 I am testing the following program: import tkinter as tk def button_clicked(): print("Button was clicked!") window = tk....
Jörg Krause's user avatar
0 votes
0 answers
138 views

I want to redirect output to a ScrolledText wigget in a tkinter environment, and use the print function to display strings with colors in the widget. My code prints the same string to the terminal and ...
Pierre Bonville's user avatar
2 votes
1 answer
95 views

I want the EXIT button to close the window but I get the following error: self.button=ttk.Button(self, text=' EXIT', command=app.exit).grid(column=0, row=0, sticky='ew') NameError: name 'app' is not ...
bob_the_bob's user avatar
2 votes
1 answer
87 views

I am spinning my wheels trying to get python to spit the keypad strokes into my textfield Entries. Below is a Min Working Example. If the cursor is within the textfield, any keystroke from the keypad ...
Thomas Murray's user avatar