Skip to main content

All Questions

Tagged with
Filter by
Sorted by
Tagged with
0 votes
0 answers
15 views

python.invalid command name ".!canvas" [duplicate]

I am making a ping pong game, in the line code ball movement ball.goto(ball.xcor() +2, ball.ycor() +2) after run the code it appear me this error message Exception has occurred: TclError invalid ...
Sara Fudl's user avatar
0 votes
0 answers
44 views

Need help on fixing tkinter error on editing tk.Entry , move button up and saving in file from gui inputs

I have a tkinter gui in Python which reads an input cfg file which looks as below: Input cfg file [job1] EXEC_PATH = /usr/path RUNIT = echo job1 TYPES = ['schedule' , 'tumbling'] [job2] EXEC_PATH = ...
A.G.Progm.Enthusiast's user avatar
0 votes
1 answer
52 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
1 vote
0 answers
15 views

Tkinter linked combobox populate by MySql data [duplicate]

I'm starting with python and trying to create linked comboboxes populate by MySql data where the second will be updated dynamically based on what is selected in the first. The principle is simple you ...
Lucius Sahaj's user avatar
0 votes
2 answers
60 views

Tkinter different behaviours for alpha using terminal and script

I'm trying to create an interface that has some transparency. I know that should be straightforward, but I'm facing a confusing bug. If I run the following code in the terminal: import tkinter as tk ...
Nathan Gavenski's user avatar
0 votes
1 answer
35 views

The .place() function in tkinter uses different left window anchor for text and entry and buttons?

I place my text, entry and buttons in the same way based on the image width as seen in the code. When I now make the window bigger than the image width, then the buttons start moving like they use the ...
SGKlee's user avatar
  • 82
0 votes
0 answers
44 views

Methods to raise a TTK frame in an OOP program

I am currently writing a program which right now shows a very simple login menu. I want to raise a new frame (which I have not wrote yet) when the user successfully logs on. To prototype the possible ...
GhostaNero's user avatar
-1 votes
0 answers
16 views

How do i get an entry from tkinter from within a seperate function? [duplicate]

I need to get the entry for 'searchEntry' when the onClick function is ran after the button is clicked. I know I could use a global but I've read its a work around, not a solution, any ideas? def ...
SplooshM's user avatar
-4 votes
0 answers
40 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
0 votes
2 answers
53 views

Tkinter: Assigning binds to a large number of widgets (frames) created by a loop function

I am developing a gallery display tool with Python's Tkinter which involves creating a lot of frames at once, each containing an image. This is achieved with 'while' or 'for' loops: x = 0 while x < ...
United Stonks's user avatar
0 votes
1 answer
37 views

I keep getting AttributeError: 'Toplevel' object has no attribute 'addtolist' when trying to call functions inside my toplevel class

I'm trying to use my function addtolist(self) within my TopSoftwareWindow() class and I keep getting AttributeError: 'Toplevel' object has no attribute 'addtolist' Here's the code for the specific ...
ThyKorey's user avatar
0 votes
1 answer
45 views

Python Tkinter use dataframe resulting from one function def (self,event) in different function within the same class

I have a combobox in one "subscreen" and I am filtering the original dataframe with combo box value but I can't use resulting dataframe to show it in the treeview function or else where. I ...
Monvana's user avatar
-4 votes
0 answers
47 views

I need help making a Tkinter Python image slide show [closed]

I'n new to Tkinter Python and I want to make a slide show box for a netflix clone site I'm making. I tried getting help from AI, but I'm getting the same shorcuts each time. Please let me what I can ...
Owen Lamour's user avatar
-1 votes
1 answer
52 views

Python tkinter works in spyder but missing attribute (simpledialog) in shell

I created a simple python script to open a simple dialog box. It works in spyder but not when I run the commands in the shell. I'm running Linux Mint. I installed Spyder with Anaconda's miniconda. ...
keithIHS's user avatar
0 votes
1 answer
76 views

Why do my radio buttons change appearance when hovered over?

I'm using Python 3.11.10 with Spyder 6.0.2. I don't know if this is a coding issue, or if it's something to do with the Spyder 6.0.2 platform I'm using, or a glitch in this version of Python, or what ...
AFrazier's user avatar
  • 147
0 votes
0 answers
30 views

ImageFont.truetype() Fonts in tkinter - do I need to know the file extension? (e.g. 'arial.ttf')

I pulled a list of available fonts from the tkinter 'font' module. from tkinter import font ... font.families()) However, when trying to select a font through the ImageFont class, I'm really ...
qandira's user avatar
  • 11
-2 votes
0 answers
18 views

How to use tkinter .get() function [duplicate]

I started learning tkinter yesterday, but thanks to a really good series of you tube videos I have progressed quite well. However, when I try to run my code:My code and press the run button it gives ...
Oscar Christopherson's user avatar
0 votes
1 answer
45 views

sv_ttk dark theme not working consistently

I have two methods that create and use tkinter windows with sv_ttk dark theme. One method, which consists of text box, scrollbar, and button, works perfectly. The second method, which consists of ...
NickB's user avatar
  • 11
0 votes
1 answer
40 views

Tkinter Python - Update a label from an instance method goes to segmentation fault

I'm trying to update a Label with a method that is called via a scheduler process, but when i try to configure the label, the app crashes with a segmentation fault This is my script class Gui(): ...
MarioC's user avatar
  • 3,228
1 vote
1 answer
31 views

Tkinter - CheckboxTreeview with tooltip for each element

I have a Python tool with CheckboxTreeview widget. Some of the content in the treeview is too long to be displayed. I would like to offer a tooltip to the user if this is the case. I already have ...
bene's user avatar
  • 155
0 votes
0 answers
16 views

Use DPI_AWARENESS_CONTEXT with tkinter

I am Using tkinter for a small application. Using from ctypes import windll windll.shcore.SetProcessDpiAwareness(2) I wanted to adjust the application on my dual monitor setup (with two different ...
Mo711's user avatar
  • 639
0 votes
0 answers
34 views

Error using Nuitka: call to '/usr/bin/codesign' failed

I am trying to create an executable from .py file using Nuitka, but "code sign error" shows up. code: nuitka --enable-plugin=tk-inter --follow-imports --standalone --onefile --macos-create-...
Rika's user avatar
  • 1
0 votes
1 answer
43 views

python Get a specific value of a label inside a loop

Simple example of the problem # import * is bad, this is just an example from tkinter import * root = Tk() root.minsize(200, 200) dict = {"1": ("banane 1", "fresh"), &...
tty0's user avatar
  • 25
0 votes
1 answer
23 views

TTK style.configure for button font size does not work

I am writing a very simple GUI application through TTK where I wish to make the font size of the text in the button bigger, however it seems to not work when I use style.configure(). I have no idea ...
GhostaNero's user avatar
-1 votes
0 answers
62 views

tkinter - configuring widgets using while loop

I have a method that does not work when being called. The program just stops working and nothing happens. def change_statistics(self): """Updates widgets in frame""" q = ...
Ryan Johansson's user avatar
0 votes
0 answers
40 views

Tkinter menu command, set string to None

I have this code I'd like to condense if possible: def ForgetPassword(): """ Clear sudo password for extreme caution """ global SUDO_PASSWORD SUDO_PASSWORD = ...
WinEunuuchs2Unix's user avatar
0 votes
0 answers
52 views

Problems with python tkinter on macOS 14.7.1

I tried to run a python script with the code line from tkinter import Tk on macOS Sonoma 14.7.1 with python3 version 3.9.1 Running the script produces the following error message: macOS 14 (1407) or ...
user3107659's user avatar
0 votes
0 answers
45 views

Why is the tk.Entry Widget not shown?

Why does is the Entry Widget with yellow background not shown? import tkinter as tk root = tk.Tk() entryText1 = tk.Entry(root, bg='yellow') entryText1.delete(0,tk.END) entryText1.insert(0,'Enter ...
Ronny's user avatar
  • 1
0 votes
1 answer
54 views

Tkinter displaying PY_VAR when attempting to set() value within Class() to display on Label

Sorry here is a rough pseudo code in place of the actual script as that is quite long In essence, I declared a local 'value' StringVar() object which will be updated in the game engine class 'QuizGame'...
Justin's user avatar
  • 99
-1 votes
0 answers
87 views

This probably means that Tcl wasn't installed properly. error

Traceback (most recent call last): File "<frozen runpy>", line 198, in _run_module_as_main File "<frozen runpy>", line 88, in _run_code File "C:\.venv\Lib\...
bineth geenuka's user avatar
1 vote
1 answer
33 views

How to Configure tufup URLs for new Updates and Fetching Metadata/Targets?

I'm using the python tufup library to manage updates for my application, it seems that I need to specify two different URLs, but I'm struggling to understand from the docs/examples where/how each one ...
Michael Romrell's user avatar
0 votes
3 answers
46 views

How to get font family name using cget

I'm using the following code: from tkinter import * from tkinter.font import Font root = Tk() root.title("Font window") root.geometry("500x500") my_font = Font( family = '...
user1367236's user avatar
1 vote
1 answer
50 views

Python Tkinter Grid Column width Not expanding need First row not Scorallable

I have three column with scrollbar and it needs to be expand and it should be stretched the window size but i am unable to increase the column width according to the screen size and i need top first ...
Sathish's user avatar
  • 389
0 votes
1 answer
57 views

Python tkinter treeview and MySQL queries [closed]

How to populate a treeview with results from many tables? I've a set of tables: athletes, grades, categories, rel_ath_grad_cath. athletes grades categories rel_ath_grad_cath id_ath id_grad id_cat ...
CodeOrion's user avatar
0 votes
1 answer
70 views

Attempting to freeze a part of scroll area in tkinter using python in Windows

I am using python 3.11.9 in windows. Here is my minimum verifiable code: import tkinter as tk class Table(tk.Frame): def __init__(self, master, header_labels:tuple,*args, **kwargs): tk....
user1371666's user avatar
0 votes
1 answer
42 views

To Show Striped Row Tags when filtering using a entry in tkinter

I want that my Treeview shows Striped Row Tags when filtering using a entry in tkinter. The code works fine before filter, the filter function also works fine but it does not shows the Striped Row ...
sendog3c's user avatar
0 votes
0 answers
28 views

Tkinter .App MacOS Runs Weird, but runs Perfect in Terminal Mode Why?

I have created an Tkinter app with one login page and a dashboard on the other page. When I open the .app I have to click Sign In like 20-60 times in order to get into it. On the other hand, if I ...
Hageshiku's user avatar
0 votes
0 answers
71 views

How can a tkinter button dynamically control the content of other buttons?

I tried to create some buttons and the content (picture) of these buttons is dynamically controlled by another button. E.g. The buttons A and B are controlled by the buttons C and D. If I was to press ...
Harald Gerl's user avatar
0 votes
0 answers
47 views

Python positioning widgets on a grid

Sory for my poor english i'm speeking french. I'm starting dev on python and i try to use Tkinter for programming my GUI then, i've some troubles with the alignement of some colums in my python app ...
CodeOrion's user avatar
1 vote
2 answers
69 views

Aligning frames in tkinter python, (customtkinter)

I'm making an app in python, with the customtkinter library. I'm using the grid() widget manager. So far, I only have a few frames as the basic layout, but can't allign them properly. The issue is, ...
Adam Brestovansky's user avatar
-2 votes
1 answer
51 views

why is the window.after() command in tkinter Python not working?

So I was working on a simple GUI stopwatch project in tkinter with a pause button (for pausing the time), a play button (for strating the time again) and a reset button (for setting the stopwatch time ...
Kanishka Negi's user avatar
0 votes
1 answer
38 views

opening a stylized Tkinter GUI from a Tkinter button click event doesn't apply the style

I have two files in a single folder: MainApp.py and SecondApp.py. Both have ttk.Style() applied to specific controls. And when you launch them individually, the styles are implemented accordingly. ...
Nii's user avatar
  • 548
0 votes
1 answer
47 views

Validating input in tkinter

I am very very new to Python (about 2 weeks). I am writing a GUI using tkinter. The interface has 3 frames. In one frame I enter data and use it to do simple calculations. I would like to test for ...
Stephen Webber's user avatar
0 votes
0 answers
69 views

'Autofit' Columns Width - Python

I'm trying to make a 'autofit' column width and the code below works really fine, but only if Im not in the tabview that the autofit occurs. Is there anyway to workaround this? from tkinter import ttk,...
Giulliano Accarini De Luccia's user avatar
0 votes
2 answers
46 views

tkinter menu add_command not working as intended

I am writing this program to show data in the form of tables using label and grids and have added a menu on each heading to perform operations on them but the function I am trying to add to them is ...
Ishan's user avatar
  • 1
0 votes
1 answer
87 views

Dynamically fill the entry in tkinter and xlwings

I have an entry widget in my GUI to be dynamically filled with the cell range based on the cells have selected in the spreadsheet. For example, if I selected A1:F30 in a sheet, it will put the range ...
Skma84's user avatar
  • 1
0 votes
0 answers
38 views

Flashcard App Issue: Show Question First, Then Option to View Answer (Tkinter Python)

I’m building a flashcard app in Python using Tkinter and SQLlite3. When I try to review flashcards, the app shows both the question and answer together immediately. However, I want the app to show ...
yasinsami's user avatar
1 vote
1 answer
66 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
1 answer
72 views

How to make entry fields and buttons transparent while using a background image in Tkinter?

I'm working on a Tkinter project where I have a login screen with a background image. I want to make the entry fields for "Username" and "Password" transparent, so the background ...
Lark's user avatar
  • 3
1 vote
0 answers
76 views

pyenv fails to install tkinter with python3.11+ on MacOS

So I ran into this issue about a year ago, but the app I was writing didn't depend on anything in 3.11 or higher specifically so I was okay just running on 3.10.14. Unfortunately, Apple decided to ...
BaconInTheRough's user avatar

1
2 3 4 5
917