Skip to main content
Filter by
Sorted by
Tagged with
0 votes
1 answer
109 views

I have an application that divides the main window in two: Left: a canvas, where a map will be displayed Right: a frame, where several other frames will share space and one of them will be shown ...
Mike Duke's user avatar
  • 235
Tooling
0 votes
4 replies
112 views

I am a newbie in Python. My assignment requires me to use a graphical interface, and I plan to use tkinter for this purpose. However, I find manually typing code too complicated. Could any expert ...
Yanbing's user avatar
-1 votes
0 answers
88 views

I'm working on a Mac using Homebrew to manage Python versions with pyenv. When I run the app, it displays a mostly gray screen; the buttons in the UI still display and function. Additionally, when ...
user32032950's user avatar
0 votes
1 answer
111 views

I have a script called GUI running two tkinter windows and I've been able to kill my program from within the script by creating a function for it def gui_kill(): root.destroy() win.destroy() ...
Paxton's user avatar
  • 11
2 votes
1 answer
72 views

I'm using DateEntry from tkcalendar. The problem is that I can only change the month and year the first time. When I try to change the year or month a second time, the calendar immediately disappears. ...
alexcr600's user avatar
2 votes
1 answer
79 views

I'm trying to have an IntVar object move from one script to another via a function that calls the second script when the toplevel window created in the second script is destroyed main script: from ...
James Logie's user avatar
2 votes
1 answer
91 views

I’m making a GUI application in Python using Tkinter that reads text out loud from PDF, DOCX, TXT, and images using gTTS. The program works, but sometimes Tkinter window becomes unresponsive and shows ...
Akshadha Awasthi's user avatar
0 votes
1 answer
102 views

When I have 2 images loaded in tkinter even though they are in a different position, only one of them shows up so I assume that one of them is deleting/replacing each other. how do i fix it? import ...
Labryinth996's user avatar
0 votes
0 answers
67 views

Whenever I'm using mss I'm trying to take a screenshot of part of my program in which I would create an array of x and y values of nodes and find the minimum and maximums of those x, y values then ...
Alex's user avatar
  • 1
1 vote
2 answers
131 views

I'm trying to create a square tk.Entry widget in Tkinter, but the width parameter only accepts integers which represent a number of characters instead of pixels. Setting width=2 makes the box too ...
Stevoisiak's user avatar
  • 27.8k
-2 votes
1 answer
96 views

I'm attempting to learn tkinter, how can i edit this code so that the text box is directly next to the input statement ? I've tried putting the text box in the first column with an alignment to the ...
Stuff's user avatar
  • 1
1 vote
0 answers
65 views

I seem to be always getting 120 for both height and width, I don't know why it refuses to give me the real value for the width so I can make the maintain the height in a 16:9 ratio # Monitor frame ...
epi's user avatar
  • 11
0 votes
1 answer
48 views

import tkinter as tk from tkinter import ttk root = tk.Tk() def change(): img2 = tk.PhotoImage(file = "img2.png") label.configure(image = img2) img1 = tk.PhotoImage(file = "...
Ingrid Ledingham's user avatar
0 votes
1 answer
108 views

Button is created like: style.configure('Dark.TButton', background=button_base, foreground=colors['text'], borderwidth=1, bordercolor=edge, lightcolor=edge, darkcolor=edge, padding=...
Maj mac's user avatar
  • 63
1 vote
3 answers
76 views

I want that when I upload a file, the label changes its name to file name to filename name. #File class class File: def __init__(self): self.filename = None def getFile(self): ...
v0id0100's user avatar
Best practices
2 votes
1 replies
35 views

How can I treat a file when the client imports a local file as a variable and using it later? def getFile(): return filedialog.askopenfilename() from operation.encryption import getFile ...
v0id0100's user avatar
Best practices
0 votes
2 replies
75 views

I have this script in Tk and it works fine. I wanted to make it dark and add hover options, so I changed it to CTk, but now it's not working. Can someone please help me fix this? I have both scripts ...
Royy's user avatar
  • 149
0 votes
1 answer
63 views

I want to put the "Selecto a file to encrypt" on the left site, a try it separate too and it didn't work. tk.Label(frame, text="Select a file to encrypt: ", fg="black")....
v0id0100's user avatar
0 votes
3 answers
66 views

I'm new into tkinter and I don't know how to put this Label: tk.Label(frame, text="Select a file to encrypt: ", fg="black").pack() Into that frame: frame = tk.Frame(root, width=...
v0id0100's user avatar
0 votes
1 answer
61 views

I have a tkinter window that runs script, with this general layout: ┌─────────────────────────────────────┐ │ Op Buttons │ ← Row 0 (fixed) ├───────────────────────────────────...
Smorkster's user avatar
  • 357
0 votes
0 answers
101 views

Quick edit for anyone in the future who sees this post: I KNOW the common way you're supposed to be importing modules in in the top of the script, outside of any methods. But the class I'm in for some ...
Dominic B.'s user avatar
-1 votes
0 answers
51 views

This happens after selecting a date from the DateEntry popup. If you type a date into the DateEntry widget the exit routine shuts the toplevel correctly. Select a date from the popup and the exit ...
Larry Plazo's user avatar
0 votes
2 answers
82 views

I wanted to try to use tkinter for the first time, and had a little program I wanted to try. It needed some text in a "table" and because of the number of rows and columns, I needed ...
TTM's user avatar
  • 21
0 votes
0 answers
71 views

I bind the enter-event to a Tkinter canvas widget. But it seems that Tkinter on Windows 11 and Tkinter on Linux Mint handle the event differently. In my example the enter-event is bound to the green ...
Matthias Schweikart's user avatar
1 vote
1 answer
82 views

I am struggling with some key bindings in Tkinter. In my application, to avoid having to make each widget get the focus prior to having the opportunity of capturing KeyPress events, I decided to use ...
Mike Duke's user avatar
  • 235
0 votes
1 answer
74 views

Running VSCode with MS Python extension and my window will not display here's my code import tkinter as tk class FormMain: def __init_(self): self.build_controls() def build_controls(...
Randino's user avatar
  • 41
1 vote
0 answers
44 views

I want to remove the box surrounding the arrow of a combobox, seen below I am using ttkinter with the theme "Clam", and styling it like this: combobox_style = ttk.Style() ...
Juan Calvo Franco's user avatar
1 vote
3 answers
115 views

I am using Python 3.14 on Windows 11. I have 2 frames (left and right) inside a top Frame, and there is also a bottom Frame that will act as a status bar. I want the left frame to be a square, giving ...
Mike Duke's user avatar
  • 235
0 votes
0 answers
38 views

from tkinter import * from tkinter import filedialog from tkinter.ttk import Progressbar import pytubefix.exceptions from pytubefix import YouTube import time def openFile(): global filepath ...
Will's user avatar
  • 21
2 votes
0 answers
57 views

I'm building a Python desktop app that uses both pystray (for a system tray icon) and Tkinter (for message boxes and dialogs). Everything works fine except for one issue on Windows 11: when I open a ...
Camilo Garcia's user avatar
0 votes
1 answer
33 views

The Messagebox shows up as it does under windows - but only shows the title not the message. I have created a simple piece of code to illustrate the problem: from tkinter import * import ttkbootstrap ...
Terry Wright's user avatar
1 vote
1 answer
137 views

I'm building a multi-frame Tkinter app for a school project (NEA dashboard). One of the frames displays a Matplotlib scatter plot using FigureCanvasTkAgg. The issue is that after switching to the ...
chaz2431's user avatar
0 votes
1 answer
140 views

I want to have fixed width frames with tkinter. The main idea is to have a dynamic number of fixed width columns (in this example 2) and within each columns a dynamic number of entries (in this case a ...
Gabor's user avatar
  • 1,509
1 vote
2 answers
106 views

import tkinter,time canvas=tkinter.Canvas(width=500,height=500,bg="white") canvas.pack() canvas.create_text(250,250,text="0:0:0",font="Arial 70 bold") global b def ...
Faith's user avatar
  • 11
2 votes
2 answers
89 views

I'm trying to catch/save the text widget state (for use later) before it is destroyed by binding it to the <Destroy> event, for example: import tkinter as tk root = tk.Tk() text = tk.Text() text....
Patrick Kwok's user avatar
0 votes
2 answers
102 views

I wrote a game with python tkinter but i don't know def stop?? I want to stop the game for seconds and then start again from where it was stopped. I want to press SPACE key and then the game stops and ...
Fatima's user avatar
  • 21
0 votes
1 answer
106 views

I am working with tkinter and I want to use three windows: startWindow addWindow deleteWindow I want to start them separately, but when I run my code, all three windows start immediately. How can I ...
David Diethelm's user avatar
0 votes
1 answer
135 views

I am using tkinter, pandas and treeview. The treeview is to display an excel file via filedialog with 15 columns, which is very lengthy, hence I needed a horizontal scrollbar. However the scrollbar ...
user2741620's user avatar
2 votes
2 answers
101 views

My program gets a list of messages and displays them on a Tkinter widget. "Previous" and "Next" buttons let me read through the message list. I can read all the messages and ...
Mike Duke's user avatar
  • 235
1 vote
2 answers
121 views

I want to make a Tkinter program where separate users can load their data, (a dictionary) from a sub-folder within the main project directory. My_project |_main.py | |_User_data | |_ Data.py ...
JohnnyLaw's user avatar
0 votes
1 answer
91 views

I have an tkinter application with several windows, which often are placed over each other in a window stack, so that only a topmost window is visible. In this topmost window I can press a button ...
Matthias Schweikart's user avatar
2 votes
1 answer
80 views

Good evening, I would like to build a tkinter interface with several buttons leading to differents script. Those script are functions in another folder. In the example I built to explain my problem, ...
seb66's user avatar
  • 25
1 vote
2 answers
113 views

I'm trying to make a Student Information System, the information will be stored in a text file, and will be shown through a table. Submit button function: def submit(): if idEntry.get() == "&...
uxzane6225's user avatar
3 votes
1 answer
106 views

In Tkinter want to import variables stored on a file in a sub directory of the main project but am having trouble. I can read the file, but cannot import variables. Please Help. def change_dir(): ...
JohnnyLaw's user avatar
0 votes
0 answers
55 views

I managed to style a treeview control to this nice gridview: container = tk.Frame(self, relief='sunken', borderwidth=1, bg='white') container.grid(column=0, row=0, sticky='nsew') container....
Daniel's user avatar
  • 2,734
5 votes
1 answer
75 views

In tkinter I wish to achieve the above goal. I can perfectly get 50-50, and 25-25-25-25. But tried everything to get 25-25-50 without success: import tkinter as tk root = tk.Tk() root.geometry("...
Daniel's user avatar
  • 2,734
2 votes
2 answers
130 views

Is it possible to sort 0:5 to frame 1, and sort 5:10 to frame 2 using one list? Now it is clicking both radiobuttons in frame 1 and 2. I would like that only one can be selected at the time. My code: ...
Royy's user avatar
  • 149
1 vote
1 answer
83 views

I have two lists, but I want them to work as one. So only one radiobutton can be activated at the time. I am trying to get them to print something without an error, but I keep getting an error because ...
Royy's user avatar
  • 149
9 votes
1 answer
411 views

These lists aren't expanding, only the last thing on the list is visible. My list works when I use it as pack. But I want to have 3 lists right next to each other with radiobuttons using grid. But I ...
Royy's user avatar
  • 149
1 vote
1 answer
54 views

I'm trying to add items to the combobox in GUIzero getting the value from a textbox when a button is pressed, but when the button is pressed I get the following error: Exception in Tkinter callback ...
Alfonso's user avatar
  • 57

1
2 3 4 5
1055