All Questions
900 questions
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 ...
0
votes
2
answers
58
views
How to make the ttk treeview not show extra empty columns?
I am building an app with tkinter and running into some annoying issues.
When I load my data into the ttk treeview, I see that there are always some additional columns on the right side of my treeview ...
-1
votes
0
answers
48
views
"_tkinter.TclError: Layout not found" issue
I encountered an issue which shouldn't have happened.
import tkinter.ttk
from tkinter import *
window=Tk()
# ...
my_style=tkinter.ttk.Style()
my_style.configure("one.Tbutton",background=&...
1
vote
1
answer
56
views
ttk Frames not filling properly
I am making a python application that uses 4 ttk Frames within its main window.
The first two frames should expand both vertically and horizontally to fill available space.
Frames 3 and 4 should only ...
0
votes
2
answers
29
views
Rendering issue with ttk.TreeView
I'm trying to use the ttk treeview widget. I'm able to create and populate it, and it seems to work properly. However it is rendering with a large empty "column" on the left side and I can'...
-1
votes
1
answer
66
views
My tkinter canvas scrollbar is very slow because there is a lot of rectangles I need solve
Image from programm i want to fix lag problem when i move scrollbar I made alot of rectangles by tkinter canvas python and when I move scrollbar to show all rectangles it is very slow and it is very ...
4
votes
1
answer
258
views
How to get all Styling parameter configurable by `ttk.Style().configure()` for a widget from Themed Tkinter?
I have been searching the answer for this question from a long time but with no success had to ask it here. I am able to get the styling parameter for from the tcl documentation, but my question is ...
0
votes
1
answer
72
views
How to change the state of a ttkbootstrap ScrolledText widget after creation?
Problem
I'm trying to change the state of a ScrolledText ttkboostrap widget after creation. I can set its state as I please when I create it, but trying to change it after creation fails for both ...
0
votes
2
answers
54
views
Detect text of an ttk entry widget
I would like detect the text of a tkinter ttk entry widget
I tried with:
import tkinter as tk
from tkinter import ttk
tk=tk.Tk()
e1 = ttk.Entry(tk)
if e1 == "good"
print("good"...
-2
votes
1
answer
170
views
tkcalendar with ttkbootstrap compatibility issues
I am using ttkbootstrap in my python script. I tried using the DateEntry from ttkbootstrap, but it does not fire an event like tkcalendar does (at least i couldnt find anything to it) and i like that ...
0
votes
0
answers
118
views
discover tkinter ttk widget structure and events
I wanted to creat a multi select combo box using python tkinter.ttk and needed to understand ttk widgets
I used the code below to get something that works, but I really want to understand how the ttk....
1
vote
1
answer
92
views
Python tkinter - grid configuration
So i just wanted to understand why tkinter is not sticking the sizegrip to the bottom right (SE) of the root window if I dont't call .columnconfiguration() and .rowconfiguration() methods on the root. ...
0
votes
1
answer
41
views
How to use height parameter in ttk.Button and other widgets?
I have a question.
How do I use height, font, and other common arguments ... in ttk.Button and other widgets?
Button1 = ttk.Button(root , height = 2 , width = 30 , font = "Tahoma 12 bold" , ...
0
votes
2
answers
78
views
Bind functions issue in Tkinter
I have reported a simplified runnable version of my code where I'm trying to bind to my Treeview to perform action on it.
My issues are the following:
the onSingleClick function is not always ...
0
votes
0
answers
73
views
How to reload a tcl theme?
I am making a ttk theme creator, so I need to reload the theme when some internal changes are made in the tcl file.
How can I reload the whole theme?
self.style = ttk.Style(self)
self.tk.call("...
1
vote
1
answer
29
views
Targeting attributes of the currently selected tab
I currently have a ttk.Notebook, tabControl, that is initialized with a singular tab, first tab. That tab comes with a tk.Text, txt.
tabControl = ttk.Notebook(self.root)
...
0
votes
1
answer
76
views
How to access the actual tab widget of ttk.Notebook?
I need to access the actual tab widget that ttk.Notebook creates when some other widget (usually a frame) is added to it (and then called a "tab" in a Tkinter parlance).
I pictured the exact ...
2
votes
2
answers
127
views
How do you get the StringVar (not the text value, the StringVar itself) of an Entry?
I'm trying to get the StringVar object associated with an Entry widget, but I can't figure out how.
I found this question: get StringVar bound to Entry widget
but none of the answers work for me. Both ...
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....
2
votes
1
answer
389
views
How to update the text of a list element within a CTkListbox
I am writing mass spec data reduction software. I want to provide the user with a list of all samples in the current sequence, next to a check box to show whether the analysis data has been reduced (...
-1
votes
2
answers
63
views
How to simplify function with multiple if-statements and multiple conditions?
I have a function which should output which test scores are significantly higher than the other test scores. There are four tests (a, b, c and d). The user will input the test scores and check ...
0
votes
1
answer
62
views
Erratic widget behavior when using a tk.Variable as a Widget attribute
I am currently having a problem with Tkinter.Variable initialization and naming.
Setup:
I have a window, with a frame (window_frame) in it and menubar at the top (tk.Menu). Each command on the menu ...
-2
votes
1
answer
29
views
Issue with creating icons in Tkinter columns
I am having an issue with my code where I would like to put icons in the second column of a tkinter treeview but so far I have only been able to to get the icons to work in the first column. I can't ...
0
votes
1
answer
56
views
Tkinter App - My Toplevel window is not appearing. App is stuck in mainloop
I'm trying to build a work schedule tracker, starting with the header. A picture attachement shows how the design will look once completed
I have three classes so far,
InputWindow: A Toplevel window ...
2
votes
2
answers
318
views
Python Tkinter resize all ttkbootstrap or ttk Button padding for a specific style, applied to all themes
I want to alter padding for all buttons using a particular style (danger). For some reason this change is only applied to the currently active theme, switching themes reverts the Button padding to ...
0
votes
1
answer
51
views
I want to update a Frame/push a variable of an image to a existing Frame but it doesn't update
import cv2 as cv
import tkinter as tk
from tkinter import ttk
from MakeImageList import *
from PIL import Image,ImageTk
class mainFrameClass(tk.Tk):
def __init__(self,*args, **kwargs) :
...
1
vote
2
answers
99
views
How can I change the font and background of my button with TTK?
In fact, I wanted to make a button for my graphical project with TTK; But sadly I failed to do that. After doing a lot of trial and error, I realized that the problem is with the font and background.
...
0
votes
1
answer
61
views
python tkinter update 'tab' header dynamically [duplicate]
I have a GUI program which updates labels dynamically.
Since I have multiple tabs with different amount of labels, I have made it dynamically, so I can reuse this code for all the information returned ...
0
votes
0
answers
84
views
Can I use a tuple for each combobox value in tkinter?
I have tuples of data for each selection in a combobox, but I haven't been able to index it or extract the string numbers, column 2 on the end. I could created lists to separate the values after I ...
0
votes
0
answers
102
views
Get the style object when only the style name is known
I started to use ttk Styles. I have now the problem, to find the style object if I only know the style name. I would like to read out properties from the style settings.
This is not really a practical ...
1
vote
2
answers
416
views
Change background color in specific (not all) ttk Entry widget
In my application, I have many Entry widgets. I would like to change the background color of the widget to make it obvious to the user that he or she have entered data in that widget and it has been ...
0
votes
1
answer
95
views
Python tkinter: Class for a scrollable frame, the widget inside the scrollable frame does not expand using sticky='nsew', why?
I wrote the folliwing class (reading some examples on the web), it works almost perfectly, except for the fact that the widgets placed inside the scrollable Frame (child of Frame) does not expand when ...
2
votes
2
answers
334
views
Retrieving the current font definition of a tkinter.ttk.Label widget
I wish to retrieve the font object currently assigned to an arbitrary tkinter.ttk.Label widget.
(To be more exact, I want to obtain the exact configuration attributes of the widget’s current tkinter....
0
votes
2
answers
282
views
ttk.Treeview - how to get multi-line columns
I'm trying to implement a multi-line column within a tkinter treeview. In the below example, I'd like the text in the Description column to wrap across multiple lines. If the user drags the column ...
0
votes
0
answers
113
views
tkinter ttk copy Style layout
I found this solution to extend a ttk theme:
import tkinter as tk
import tkinter.ttk as ttk
class Style(ttk.Style):
EXTENDS = 'extends'
def __init__(self, parent):
super().__init__(...
0
votes
1
answer
85
views
Tkinter Grid Not Placing Widgets in Correct Columns
I'm trying to create a ui using a tkinter grid to allow the user to enter certain values on two different frames that I want to be able to switch between.
I have grided all the widgets in different ...
1
vote
2
answers
515
views
Tkinter theme is slow
I'm using this them in py tkinter program. My problem is that I make like 20 buttonst, it becomes very slow. I know that this is beacuse all the buttons have images. I alredy get a suggestion, that ...
0
votes
1
answer
173
views
tkinter (ttk) leaving artifacts when updating widget
When updating a value in a widget using tkinter there's traces of the old widget's state on screen, and I was wondering if there's any fix to this. I'm assuming tkinter just re-draws whatever it needs ...
0
votes
0
answers
101
views
How to connect a Treeview to a list in tkinter?
I want to create a table with tkinter.
I was about to use multiple Listboxes adjacent to each other, but I discovered ttk.Treeview.
However, I don't see any alternative to Listboxes' '-listvariable' ...
0
votes
1
answer
161
views
I'm not able to add a background color or a shadow color for ttk.frame
How do I add a shadow to the ttk.frame? (NOTE: I'm using the sun vally theme from github).
App: I'm creating a to-do list app. Which is just a little simple project, but I've incountered this problem ...
1
vote
0
answers
99
views
How to make ttk.Ttreeview rows cover the whole available height?
Good time of day!
My Treeview widget sticks to "news" directions, so whenever I resize my app - it shrinks/expands with it. The problem is, when Treeview doesn't expand enough to fit a whole ...
0
votes
2
answers
58
views
Change BG colour
I can't change the colour of the frame area..
CODE::
import time
import threading
import sqlite3
import tkinter as tk
from tkinter import ttk, Text
import os
class PomodoroTimer:
def __init__(...
0
votes
1
answer
81
views
How to send a signal to run a function one folder up in Python, maybe even with Tkinter library
Trying to create a simple program where one desktop receives a message from a client from another desktop and changes the color of the background. The problem is that I am not sure how to go about ...
-1
votes
2
answers
52
views
ttk StringVar doesnt change
when i click the start button, the only thing that happpens is the button becoming disabled. nothing else happens. any idea why the timer doesnt start?
The idea as you see is to get the entry and ...
0
votes
0
answers
63
views
Tkinter ttk not updating until I unfocus and refocus or resize the window
I am trying to make a frame that the user can scale with their mouse.
I have code that is supposed to make a frames x size follow the mouse while my mouse is down. My resize code is running whenever I ...
0
votes
1
answer
81
views
Why do I keep getting an Attribute error (circular import)
So I'm trying to learn how to code and when I try to split up my code into multiple files using the import function, I keep getting an Attribute error. It says that it is most likely due to a circular ...
0
votes
1
answer
133
views
I want to convert a ttk.Combobox to a CTkComboBox, but it then it doesn't work
First, I will show the original code which is
def apply_filter(filter):
image = Image.open(file_path)
width, height = int(image.width / 2), int(image.height / 2)
image = image.resize((...
1
vote
2
answers
82
views
Specifying Event Parameter to CustomWidgets in Tkinter
I have a CustomNotebook style with close buttons on each tab:
class CustomNotebook(ttk.Notebook):
"""A ttk Notebook with close buttons on each tab"""
...
0
votes
3
answers
872
views
Python tkinter/ ttkboostrap dateentry doesn't work when in readonly state
I am working currently with the ttkbootstrap librairy instead of the ttk librairy in the past. I used to use the ttk DateEntry widget in the "readonly" state which worked perfectly fine. ...
0
votes
0
answers
42
views
Read all widget from external module in tkinter
I want create online application with tkinter that widgets and menus and ... ,read from one .py file
I made a program with tkinter that after the user enters his username and password according to the ...