Questions tagged [tkinter]
Tkinter is the standard Python interface to the "tcl/tk" graphical user interface toolkit. In Python 3, the name of the module changed from Tkinter to tkinter.
tkinter
52,463
questions
1
vote
1
answer
8
views
How can I find the exact width of a CTkLabel?
I've been using customtkinter for a little while now, and I have a situation where I want to find the exact, pixel-perfect width of a CTkLabel from the font size and length of the displayed string. ...
0
votes
1
answer
28
views
Tkinter Search Box with Editable Output
I am using the following TKinter Code to return a matching value from an existing dictionary.
However, in my use case, the returned value is not always going to be accurate; it is just a good guess ...
0
votes
0
answers
106
views
Pandas table error while try to get col positions
this is example of my code - im using tkinter with tabs and pandas table inside.
when im trying to insert data to a cell in the first tab im getting error
`
import pandas as pd
from pandastable import ...
0
votes
0
answers
24
views
Tkinter - return function that is activated by protocol gone wrong
to make a universal window management function that will be dynamic enough I've used some tricks.
but one that didn't work for me, is the window's variable assignment by making the bind assigned to ...
1
vote
2
answers
66
views
Variable not defined after using "global" keyword
I am trying to make rock paper scissors with a Tkinter GUI, but for some reason in my "run" function (unfinished) player_number is undefined,
def run():
result.grid(column=3, row=1)
...
-1
votes
1
answer
40
views
Attribute error 'str' object has no attribute 'create_habit_window'
I am trying to make a habit tracker and create a window called create_habit_window with Customtkinter. but its keeps sayin that in create_habit
self.create_habit_window = customtkinter.CTk()
^^...
1
vote
1
answer
33
views
How to ensure only one instance of a Tkinter executable Python script is running?
I'm developing a Tkinter-based GUI application in Python, and after converting it to an executable using tools like PyInstaller or pytoexe, I encountered an issue where launching the executable ...
1
vote
2
answers
37
views
How do properly position my widgets relative to each other and the center of the window with tkinter?
So I am having trouble creating a GUI that can dynamically adjust to the size of my window. What's going on is that one, I want my widgets to scale automatically with the width of my window. I also ...
0
votes
0
answers
7
views
ttkbootstrap Style.configure() not working with 'warning.Roundtoggle.Toolbutton' style to change font
I am working on a tkinter python app using ttkbootstrap to have better styling and am trying to use round toggle check buttons to make it look nicer. By default these have a smaller font size than ...
0
votes
1
answer
42
views
Attempt to resize button in TKinter returning error
Making an extremely simple program where a button follows the mouse, and when clicked, should randomly resize. But I when I run the code below, I get an error, saying that the "height" ...
-1
votes
1
answer
22
views
Text DISABLED but leave Scrollbar NORMAL
I can't seem to find a solution to this one. If I have a textbox that I state=DISABLE, it also disables the scrollbar.
Is there a way around this?
from tkinter import *
from tkinter import ttk
#Create ...
0
votes
0
answers
18
views
Building a class to apply styling and behavior to targeted tkinter widgets and can't get them to behave together
I wanted a button with a bit more on it's face, a fancy button, and ended up building a FancyButton class that will wrap a "surface" defined by tkinter widgets in a series of frames and ...
0
votes
2
answers
42
views
How do I change the value of a label dynamically depending on a ComboBox in CustomKinter?
This is my first time using CustomKinter to make a simple GUI. I am trying to get the value of a customtkinter label to change depending on the value selected by the combobox. The textvariable for the ...
0
votes
0
answers
40
views
Non-blocking Tkinter window
I have read multiple similar questions & answers, but somehow still have not understood how to apply them to my particular use case. The best I found was using Tkinter with Thread:
from Tkinter ...
1
vote
0
answers
28
views
Matplotlib freezing for no reason. What am I doing wrong
I'm trying to draw an interactive matplotlib figure in Tkinter. I've taken the slider_demo https://matplotlib.org/stable/gallery/widgets/slider_demo.html and tried encapsulating it in ...