641 questions
1
vote
1
answer
75
views
Collapse labels if empty
I have three labels that are directly under eachother (see image). I'd like the labels to be collapsed when they're empty.
In the case of the image, the second label is empty. I'd like the third label ...
1
vote
0
answers
148
views
CustomTkinter - Vertical scrollable frame next to non-scrollable frame
I have a CustomTkinter app with an horizontal CTkScrollableFrame. Inside this frame, I have two frames:
On the left, a CTkFrame, non-scrollable, here in blue, containing a smaller CTkFrame` (or any ...
0
votes
1
answer
123
views
Controlling Customtkinter from a Thread
I want to deactivate and activate CustomTkinter buttons from the thread. But the buttons are deformed (image artifacts appear). Why does this happen and how to solve the problem?
I expected smooth ...
0
votes
1
answer
108
views
How to make the background of image transparent in custom tkinter?
I have a button that is an image. I would like to make the background of the image transparent as it is currently showing the png background.
Thank you for any help.
This is my code and what the ...
0
votes
3
answers
2k
views
Can't change the background color of window in `customtkinter`
I am trying to change the background color of a CTk window using customtkinter, but nothing seems to work. Regardless of what color I try to set, the window always shows the system default dark ...
0
votes
0
answers
36
views
Labels not displaying in CustomTkinter GUI
I am writing a Python script using CustomTkinter to display system stats on a little monitor that will be connected to a Raspberry Pi. The code outputs the CPU and RAM usage to the console and updates ...
0
votes
2
answers
55
views
How to get asymmetric buttons in Tkinter frame
I have a Tkinter frame with 3 buttons side by side. My goal is to have the left button about 2 or 3 times wider than the others. I tried many different grid configurations but nothing works, they stay ...
0
votes
1
answer
146
views
Why is customtkinter label height not working?
I am trying to limit the height of a Customtkinter label but no matter what I set the height value to it doesn't seem to do anything. I am using the Spotify API to fetch the name of the track which is ...
1
vote
3
answers
52
views
How to place a label on top of 2 frames
How do I put a label on top of 2 frames? One frame is the background(wallpaper) and the other one is a box.
class HomeScreen(CTk):
def __init__(self, *args, **kwargs):
super().__init__(*...
2
votes
1
answer
70
views
Trouble Resizing widgets in Custom Tkinter when going into another page
I was trying to use the set_widget_scale function to resize my widgets based on the resolution of the window, when I resize the widgets on the main page it works fine when the resolution is chosen, ...
0
votes
1
answer
112
views
Customtkinter widgets has white background when loaded
could not find solution, so posting my issue.
In my application I have set appearance mode to "System" and it loads correct theme but widgets have white background and corners.
Loading with ...
-4
votes
1
answer
62
views
SQL paramter must be list, dict or tuple, but the parameter is a list [duplicate]
I am trying to pass a variable called "data" From a class called LoginOrReg in a file called LoginOrReg to another class in another file Called HabitTracker, but i get a programming error
...
0
votes
0
answers
59
views
How do I keep a TKinter window open after playing audio using pydub?
I'm building a basic text to audio app using python.When I play an audio file after taking an input from a user and clicking a button, the window closes after the audio file is played.
app = CTk()
app....
2
votes
2
answers
145
views
Customtkinter grid buttons not centered
I am trying to make a control panel GUI using customtkinter which essentially consits of different pages with different buttons, however when I go to a different page, the buttons aren't centered.
As ...
1
vote
2
answers
137
views
Python, gui, ctk
so, I am creating a blog, and right now, I am in the settings part, and I have a slide panel with a button that I want it to go to a new window where I will create new widgets and etc..., I have ...
0
votes
1
answer
57
views
Trying to center and uniformly space a 4x4 grid of entry widgets within a frame, within a frame class. What am I missing?
First up, I'm really pretty bad at OOP and tkinter/customtkinter and this is only my third project I've built with classes over straight functions, so please excuse my mess. I'm getting there, and ...
0
votes
1
answer
137
views
Issue with centering a TextBox in Python Tkinter
I'm currently using Customtkinter and encountering an issue with horizontally centering text within a CTkTextbox. Here is a snippet of my code:
textbox = customtkinter.CTkTextbox(master=self....
-1
votes
1
answer
72
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()
^^...
0
votes
0
answers
63
views
Creating a button with an image in but the button hitbox is too large
I'm creating an app with custom tkinter and when I add the image and change the width and height of the button I get this horrible hitbox. How can I make it match the image?
import customtkinter as ...
0
votes
0
answers
36
views
'list' object has no attribute 'destroy'. Tkinter destroy, forget function [duplicate]
So in summary my code is making a changeable amount of Entry's and Labels.
There is a part of this code that is important.
for i in range(10):
for z in range(5):
entry_dict = {}
entry_dict[f'...
0
votes
1
answer
329
views
Is there an way to center align vertically in customtkinter?
I had this question, which I searched online, but seemed to only get the online GitHub docs for customTkinter.
I have this code that is straight out of the documentation, and I have only removed a few ...
2
votes
0
answers
122
views
How can I set a consistent theme for the ttk widget of tkinter?
I am building a GUI application using customtkinter. My main window is hence initialised with customtkinter.
Treeview widgets don't exist in ctk, hence I am using a treeview widget from tkinter ttk ...
0
votes
1
answer
453
views
How do I set a specific width for a grid column in customtkinter?
I have the following options GUI which I'm trying to build:
import customtkinter as ctk
# Create a tkinter window
window = ctk.CTk()
# Create a frame for options
opts_frame = ctk.CTkFrame(window)
...
1
vote
1
answer
72
views
Matplotlib Themes Not Applying [closed]
I have created a GUI with customtkinter to plot charts. One of the options I have is a drop down menu of different themes. When I run the script in PyCharm, the selected theme in the drop down option ...
3
votes
1
answer
79
views
customtkinter raises error and has conflict between buttons
I am writing a dictionary program using customtkinter library. There is one button and a switch. When I press the right button, the programm destroys first ten sets of widgets and creates next 10 so ...