Skip to main content

All Questions

Filter by
Sorted by
Tagged with
0 votes
1 answer
55 views

How to drag and drop items across frames in tkinter?

I have a tkinter gui which displays some nodes in levels. The levels are split into frames and on each frame the nodes are placed as per a level dictionary defined in the class Viewer. I want to drag ...
A.G.Progm.Enthusiast's user avatar
-4 votes
0 answers
41 views

score += collision is submitted as a TypeError [closed]

I was running Python 3.12.6 and using Tkinter. I noticed an error about the Tkinter file, saying it had an unknown command or something. That wasn't my fault. However, when I tried to set a variable ...
Blazecat341234's user avatar
1 vote
1 answer
67 views

MacOS points to old tkinter gives blank screen

This seems to be a perennial question about getting MacOS to point to the correct version of tkinter. I have a very simple python script that draws to the canvas from geeksforgeeks. from tkinter ...
JKomp's user avatar
  • 43
0 votes
0 answers
60 views

Try to exhibit PDF but didn't show

I want to exhibt a PDF file in a tk window but the window is not opening and no Exception is raised import tkinter as tk from tkPDFViewer import tkPDFViewer as pdf cur_file='PPC_Bach.Eng_.-de-...
Victor Luz 's user avatar
0 votes
1 answer
61 views

Function successfully called from other .py file, but failing to run (Python 3.x, tkinter)

I have made a short program that extracts sample accounts data and drops it into a template, controlled by a button that selects which accounting rules to follow. Initially, I created two functions(...
Misa's user avatar
  • 1
0 votes
1 answer
42 views

How can I make the layout of images match other screen resolutions?

How can I make the layout of images in a program on other computers with a different resolution be the same as on my computer. For example: I run a program on my computer and everything is fine with ...
kot may's user avatar
  • 33
0 votes
1 answer
60 views

Tkinter GUI window freezes, how can I work around the issue?

This is an issue within a larger program that charges and discharges supercapacitors. The CELL_DISCHARGE function is a function that, as the name suggests, discharges the cells of the supercapacitors ...
camknight15's user avatar
0 votes
0 answers
84 views

Why does my tkinter app resize after running a pywebview window?

I have a simple tkinter app with 2 buttons. I'm using 1 button to open a pywebview window to a website. Initially, the 2nd button was to close this window, however I kept getting a problem where the ...
EmKare's user avatar
  • 1
0 votes
1 answer
56 views

how do you make a tkinter combobox that can switch a given widget type to another widget type in a specific place

so specifically i wanted to make two comboboxes, a button. along with 8 other widgets to switch between, in 8 widget "places" (specific areas where i put the widgets) the first combo ...
Chillboy 2268's user avatar
0 votes
1 answer
36 views

Tkinter - Frame can scroll horizontally, but will not vertically size itself properly

I have a frame that is scrollable horizontally. That is working as desired. I desire the frame to vertically size itself such that all widgets are displayed. Currently, the frame will not grow as ...
JClark's user avatar
  • 199
0 votes
2 answers
106 views

Tkinter Window is empty on MacOS

The script is intended to create a window with a navy background and 200 yellow stars, but the window remains empty, and even the background color does not change. But on my friends laptop (he has ...
Danylo Hromyak's user avatar
0 votes
1 answer
35 views

Is there a way to get the value from Slide bar (Scale) after releasing the mouse button in Tkinter?

I am trying to get only the last value after using the slice bar with Tkinter but I am getting all intermediate values too. I am trying to use a linear stage with Tkinter and it is a problem if it ...
brakisto's user avatar
0 votes
1 answer
53 views

How can I make the layout of the interface fit other screen resolutions,?

How to make the layout of the interface in the program on other computers with a different screen size (resolution) was the same as on my computer. For example: I run the program on my computer and ...
kot may's user avatar
  • 33
0 votes
0 answers
251 views

Python (TKinter + Turtle) - "failed to remove temporary directory"

I'm creating a Python application using pygame, turtle, and tkinter. While everything works fine in my IDE (PyCharm), I encounter an error when trying to restart my program using the onkey event from ...
Ben's user avatar
  • 1
0 votes
0 answers
35 views

Error when using animated(GIF) images in tkinter window in python language

I have a problem related to the use of tkinter (Python) when using an animated image (GIF file). The thing is that the animated image (GIF file) is not played in my program, but only a couple of ...
kot may's user avatar
  • 33
1 vote
1 answer
49 views

Is there any way to catch and handle infinite recursive functions that create Tkinter windows?

I have a student that submitted a function like this: def infinite_windows(): window = tkinter.Tk() infinite_windows() I already test things inside a try-except block. My code reports the ...
Kyle's user avatar
  • 584
0 votes
2 answers
76 views

problem with insert GIF in python(TKinter)?

How to make it so that the gif was not in the main window (menu, greeting), but in the final window . I was able to insert a gif in the beginning of the program, but in the final window did not work, ...
kot may's user avatar
  • 33
1 vote
0 answers
88 views

CTkComboBox Dropdown Closes Immediately for Large Lists

I'm using CustomTkinter to create a GUI in Python, and I'm facing an issue with the CTkComboBox widget. When I populate the ComboBox with a large list of items, the dropdown menu shows the options, ...
SNC92's user avatar
  • 11
1 vote
3 answers
83 views

How to set width/height of widgets within a Paned Window widget in Tkinter after initialization?

I'm trying to create a save/restore functionality in my Tkinter GUI, but I'm having trouble restoring the width/height of Widgets within a Paned Window. I've tried .place() and .config, but the ...
explodingfilms101's user avatar
0 votes
1 answer
53 views

How do i change the size of my Text widget?

I really need to change the size of textbox but I keep on getting nothing. Here is code: import tkinter as tk from tkinter import * from tkinter import ttk class App(object): def __init__(self, ...
Misaki's user avatar
  • 1
2 votes
3 answers
105 views

Change Theme with a button - python Tkinter

I'm trying to have a program change from light to dark mode with a check button but it does not change the theme import tkinter as tk import ttkbootstrap as ttk #setup window = ttk.Window(themename =...
Duck's user avatar
  • 21
1 vote
1 answer
89 views

Making a user-friendly input for subdividing a square into coordinates

I am working on a program (in Python) that involves cutting a square(s) into smaller pieces. The user has to enter a 'code', which the program will automatically convert into the coordinates for each ...
Leo's user avatar
  • 35
1 vote
3 answers
138 views

python oop does not recognize command, why?

I am converting a function type app to an oop version, and ran into trouble. Here is my destilled problem code: from tkinter import * from tkinter.font import Font class createBlank(): def ...
Ralph Bloch's user avatar
0 votes
1 answer
39 views

Differing behaviors in Popen.readline() between IDE and terminal runs

I have a Tkinter GUI program that I would like to update a text Frame on with output from a called process. I managed to make it work pretty well using threading and subprocess, with the 'run' button ...
Gareth's user avatar
  • 93
0 votes
1 answer
52 views

I can't insert background image, make full screen mode and close previous windows

I am writing a program that will work according to the algorithm (that is, when you click on some buttons can appear another window or the final window with the result, and from Toplevel(opennewwindow(...
kot may's user avatar
  • 33
0 votes
1 answer
53 views

Isuues with pyinstaller (Module Not found)

I have created a Python (.PY) file thatuses the Tkinter package inside it and executes perfectly in Spyder. Now I am trying to convert it to .EXE file using pyinstaller package, once I convert tried ...
san1's user avatar
  • 515
0 votes
1 answer
76 views

image and buttons not being displayed in popup window

i used a previous version on this project since the latest on got corrupted due to unknown reasons. it was working perfectly fine before but suddenly an encoding error appeared and i decided to ...
MrGrapes2565's user avatar
0 votes
0 answers
54 views

Image Not being displayed in popup window

Here is the code: import tkinter as tk from tkinter import * from tkinter import messagebox import tkinter.font as font from tkinter import ttk from PIL import Image, ImageTk def CustomerScreen(): ...
MrGrapes2565's user avatar
1 vote
0 answers
54 views

Having the same _tkinter.TckError with no solution [closed]

class AutoCompleteEntry(CTkEntry): def __init__(self, master, suggestions, placeholder=None, **kwargs): self.var = tk.StringVar() super().__init__(master, textvariable=self.var, **...
Swagato Naskar's user avatar
0 votes
1 answer
48 views

Why is my Tkinter image failing to load / be retained when the active file is not __main__?

I am developing a Python application using Tkinter. I have created a module which is essentially a modal to be called elsewhere in the application - in the same file I check if name is main, and I ...
Alex's user avatar
  • 1
-1 votes
1 answer
106 views

Installing Tkinter somehow installs a different module [closed]

I'm on Linux Ubuntu 22.10. So I installed Tkinter using this command: python3 -m pip install tk and the output was fine: Defaulting to user installation because normal site-packages is not writeable ...
Dw8ke's user avatar
  • 1
-1 votes
3 answers
166 views

How to disable Entry Widget when clicked outside of Entry Box

I'm making a GUI application in Python 3 with the Tkinter module. My app includes an Entry Widget that the user can type into. The only problem is that when the user is done typing and clicks outside ...
Space Cat's user avatar
-1 votes
1 answer
106 views

What is the proper way to deal with the resource path? [closed]

I'm working with Python and multiple of my GUI classes require some images. Is it okay to simply add the resource path via a constant and import it everywhere? The other approach I was considering was ...
Egg's user avatar
  • 23
1 vote
1 answer
99 views

Scrollbar in tkinter is not working with canvas

I am new to the python and tkinter, I want to create Dashboard using tkinter. I wrote the below code to add the graphs in tkinter using the Matplotlib. As I have 4 graphs and not able to fit all, so ...
Chandrakanth Reddy's user avatar
1 vote
2 answers
67 views

How can I create a function in python that takes an object, modifies the location of it and other objects using CustomTkinter?

I am creating an app that lets you choose exercises and basically what I've been trying to do is create a function that takes the ".grid" element and for the exercise chosen and moves the ...
2185358's user avatar
  • 11
3 votes
0 answers
125 views

Memory Leak Issue with Tkinter GUI application

I'm facing a memory leak issue with a custom widget in a Tkinter/customtkinter application. Despite my efforts to manually delete and clear all member variables, the memory is not being fully cleaned ...
Thisal's user avatar
  • 310
0 votes
0 answers
112 views

My .py file works perfectly, but when I turn it to .exe it fails

I'm trying to code an app that lets you download many videos (or audios) from Youtube at the same time using Python, specifically the libraries tkinter and pytube. When I run it as a .py file, ...
Potato 920's user avatar
2 votes
1 answer
73 views

tcl issue while running a python script from another python app (converted to exe)

I made an app in tkinter which helps creating tkinter app/scripts, (when I export the file it is stored as a .py) I want to run this .py script from my app so that we can preview it immediately after ...
Akascape's user avatar
  • 532
0 votes
0 answers
85 views

Why does my python program start another instance of itself at a button click?

Every time I click a button in the app I am currently working on, the program goes to "no response" and then launches another instance of itself while the old one is still active. I don't ...
snoms's user avatar
  • 1
0 votes
0 answers
44 views

Cant get spotipy to play without browser

I've been trying to get this thing going with just previews, but when i use the button nothing happens, no error, nothing device = self.sp.devices() for device in device['devices']: ...
Herp's user avatar
  • 1
1 vote
1 answer
100 views

Error When Displaying Image Through customtkinter (pyimage26)

Within my code script I have a window open up that should display a image of a creeper head. Whenever I try running the code, I get this error: Exception in Tkinter callback Traceback (most recent ...
Spacen64's user avatar
0 votes
1 answer
27 views

Variable was not returning from external function when we use lambda in Button Tkinter

I have written main file as MMM_LaTeX_PreCleanup.py and three external files which have different function namely TeXImport.py, VadidateMMMModule.py and XMLImport.py. MMM_LaTeX_PreCleanup.py coding ...
Srinivasan Ganapathy's user avatar
0 votes
2 answers
113 views

How to remove the arrow from ttk.Menubutton (+ bonusquestion)

I want to style a menubar and I want to remove the menubutton-arrows. I know, I could color them in the same color as the background, but then I also have to do that for any other state (hovering, etc....
Solanaar's user avatar
0 votes
1 answer
40 views

I need help finding a sneaky bug, tkinter python3 script

Buttons on the 2nd tab are way too spaced apart for some reason ive been trying to fix this for a decent chunk of time with random things like rowconfigure and frames etc but it never works. import ...
thebigdawgstepper's user avatar
0 votes
1 answer
41 views

Access the tkinter widget properties from callback function

I have a function, lets call it create_window,where I created a tkinter window with only a label and a button. I have a command which calls a callback function, lets call it change. I can not access ...
Lacho's user avatar
  • 11
0 votes
0 answers
42 views

Use dotenv LD_LIBRARY_PATH in python-tkinter

I am new to python-tkinter. I am trying to load a library in tkinter tcl interpreter. However, I am not able to use environment variable LD_LIBRARY_PATH which I am setting using dotenv. Here is the ...
crazyMinds's user avatar
1 vote
0 answers
117 views

On Windws, Windows Subsystem for Linux (WSL) and every time I install Python, I get ModuleNotFoundError: No module named '_tkinter'

On Ubuntu 24.04, Here is the Error I get: [I] /home/sporty~> pyenv install 3.12.2 Downloading Python-3.12.2.tar.xz... -> https://www.python.org/ftp/python/3.12.2/Python-3.12.2.tar.xz ...
user1135541's user avatar
  • 1,891
-1 votes
2 answers
51 views

How to share values from sub window to main window without destroying the sub window in tkinter python

I am working on a program which could take input from user in sub window and display a coloured label with width inputted to it. But I can't get the idea to take the input without destroying the sub ...
Ananthajith Girish's user avatar
1 vote
1 answer
51 views

Tkinter UI auto enlarges after changing style

So, I followed an online video, and tried to replicate the UI, while applying my own changes to fit my needs, but I ended up with a UI that keeps enlarging every time I change the theme. I tried ...
Amine Messabhia's user avatar
2 votes
1 answer
70 views

Only do this action once in a for loop

I need to do this action once under certain conditions in a for loop to stop duplicates appearing in the checkboxes. Theoretically, this should work I believe but when the conditions are met for this ...
Moorane's user avatar
  • 23

1
2 3 4 5
135