Questions tagged [customtkinter]
For questions about the Python library customtkinter which wraps the built-in Tkinter
590
questions
17
votes
1
answer
38k
views
ModuleNotFoundError: No module named 'distutils' in Python 3.12 [duplicate]
When I try to import customtkinter in Python 3.12, I get the following error:
File "c:\Users\judel\OneDrive\Documents\Python\main.py", line 1, in <module>
import customtkinter as ...
6
votes
1
answer
2k
views
pytube.exceptions.RegexMatchError: get_throttling_function_name: could not find match
def video_downloader(video_url_list: List[str], download_folder: str) -> None:
"""
Download videos from a list of YouTube video URLs.
Args:
video_urls (List[...
5
votes
1
answer
921
views
_tkinter.TclError: can't delete Tcl command - customtkinter - custom prompt
What do I need
I am trying to implement a custom Yes / No prompt box with help of tkinter. However I don't want to use the default messagebox, because I require the following two functionalites:
a ...
4
votes
4
answers
11k
views
Problem in making an exe file using Pyinstaller (file made using tkinter and Custom tkinter)
I am trying to make a small application for data entry using tkinter and custom tkinter. The code runs fine in python and I made the exe file of it using
pyinstaller --onefile --noconsole try45.py
...
4
votes
2
answers
23k
views
Custom Tkinter Images
I'm trying to create a back button. I have an image called back-button.png in the folder img.
This is my code:
from tkinter import *
import customtkinter as ctk
root = Tk()
ctk.CTkLabel(root,
...
3
votes
1
answer
2k
views
How to put iconbitmap on a CustomTkinter TopLevel?
This is the code example:
class ToplevelWindow(customtkinter.CTkToplevel):
def __init__(self, *args, **kwargs):
super().__init__(*args, **kwargs)
self.geometry("400x300")...
3
votes
1
answer
588
views
Python customtkinter AttributeError: 'int' object has no attribute '_root'
i just took over a project in python after a year and i wanted to rebuild it with customtkinter using the documentation. Here is the code:
import customtkinter
import tkinter
from pytube import ...
3
votes
1
answer
6k
views
How to add progress bar on customtkinter?
import customtkinter as CTK
class App(CTK.CTk):
def __init__(self):
super().__init__()
self.bar = CTK.CTkProgressBar(master=self.checkbox, orientation='horizontal', mode='determinate'...
3
votes
1
answer
2k
views
TKinter ComboBox Variable Issue
I am trying to use tkinter, more specifically customtkinter, to create a combobox and have a variable in the first combobox determine what another combobox's options are. I think the syntax maybe a ...
3
votes
2
answers
4k
views
customtkinter - How to edit CTkEntry border?
So I'm using the customtkinter to create an interface. I have an entry and I want it to have a background, but I cant't do it. In the documentation, there isn't an argument for the border. ...
2
votes
2
answers
778
views
Tkinter, update widgets real time if list is modified
Let say I've a list of widgets that are generated by tkinter uisng a loop (it's customtkinter in this case but since tkinter is more well known so I think it'd be better to make an example with it), ...
2
votes
1
answer
546
views
check if Toplevel windows was closed?
I have a tkinter app, created with customtkinter:
import customtkinter
class App(customtkinter.CTk):
def __init__(self):
super().__init__()
Extra()
self.mainloop()
class ...
2
votes
1
answer
345
views
Python - text color of one variable in multivariable sentence in Tkinter label
The text source consists out of elements from a nested lists. A label is created for each element in the list. Below the code:
list1 = [["test", 3, 2, 0], ["test2", 4, 1, 1],["...
2
votes
1
answer
6k
views
How can I get the text in a textbox in customtkinter?
I am building a text editor but I can't save the file because I can't get the text within the textbox. Even thought in the entry widget I can use .get() to get the text.
I tried .get() but it displays ...
2
votes
1
answer
102
views
_tkinter.TclError: invalid command name in Python
This is my debut on this site, so I will start short with introducing myself. I’m Thomas from Denmark, I hold a bachelor's degree in construction engineering and I’m trying to learn to program in ...
2
votes
1
answer
372
views
Why I'm getting this error when displaying an image in customtkinter?
I'm trying to display an image from a specific folder, but the error "_tkinter.TclError: image "pyimage2" doesn't exist" is showing. I have verified the image path, and it's ...
2
votes
1
answer
9k
views
Custom tkinter label background
I am making a school project, and right now I'm having a problem with the label's backgrounds.
the objective is to make the label's background the same as the frame in both dark and light themes, and ...
2
votes
0
answers
4k
views
Customtkinter/Tkinter canvas objects jumping around
I am fairly new to tkinter and I've been working on this feature of my project that allows a user to drag and drop canvas objects around, however when I move around the canvas and try to move the ...
2
votes
0
answers
72
views
Python TKinter - breaking buttons, labels, comboboxes into separate files
I have a fairly sizeable tkinter project and I am trying to break apart my buttons, labels, comboboxes etc. into separate .py files. Is it possible to do this using classes?
For example, I have a main....
2
votes
0
answers
253
views
How to separate Custom Tkinter GUI process to deal with MultiProcessing Pickling Issue
Summary: I am experiencing the issue TypeError: cannot pickle '_tkinter.tkapp' object I believe this is fixable by
ensuring the GUI is running in an entirely separate process
How do I do that with ...
2
votes
2
answers
2k
views
How to make a window fullscreen in customtkinter?
Tkinter has this method:
window_name.attributes('-fullscreen',True)
and customtkinter?
I haven't found anything but
geometry(f"{WIDTH}x{HEIGHT}")
However when I grab screen size and put as ...
1
vote
2
answers
5k
views
Using drag and drop files or file picker with CustomTkinter
I have recently decided to start learning Python and while doing several small projects as a hands-on approach, i discovered the customtkinter library (https://github.com/TomSchimansky/CustomTkinter) ...
1
vote
3
answers
5k
views
ValueError: ['text_font'] are not supported arguments. Look at the documentation for supported arguments
ValueError: ['text_font'] are not supported arguments. Look at the documentation for supported arguments.
the following error is showing when I try to run my customtkinter GUI on visual studio for ...
1
vote
2
answers
3k
views
AttributeError: module 'customtkinter' has no attribute 'CTkFont', i imported customtkinter?
Does someone know, why I get this error?
I imported customtkinter the correct way and already redownloaded it, do i have to import it seperately?
I import customtkinter and get this error:
...
1
vote
1
answer
284
views
CustomTkinter progress bar with a stoppable thread
I am trying to combine a ctk progress bar from https://stackoverflow.com/a/75728288/7611214 on a thread that is stoppable like https://stackoverflow.com/a/325528/7611214. I think I am close but I just ...
1
vote
1
answer
465
views
python custom tkinter widgets don't appear in the window
I'm trying to create a sample GUI using tkinter with customtkinter module ,but nothing appears in the window.
import tkinter
import tkinter.messagebox
import customtkinter
customtkinter....
1
vote
6
answers
15k
views
python customtkinter library - how to install
I need to install the customtkinter package for python.
I used the command pip install customtkinter to install the package.
When running pip list I can see the customtkinter package version.
In the ...
1
vote
3
answers
3k
views
Why is the custom tkinter placeholder text for an entry box ignored?
import tkinter as tk
import customtkinter as ui
ui.set_appearance_mode("dark")
ui.set_default_color_theme("dark-blue")
root = ui.CTk()
root.geometry("500x350")
frame = ...
1
vote
3
answers
5k
views
Changing text in a label not working in customtkinter
I am trying to create a simple age calculating program using customtkinter as it is my first time using it although for some reason the age is not showing up in the age_label. What is supposed to ...
1
vote
1
answer
34
views
how to update a label in countdown with customtkinter
I was creating a sound recorder and when i wanted to create a countdown i face problems
here's my code
from customtkinter import *
import sounddevice
from scipy.io.wavfile import write
import time
...
1
vote
1
answer
1k
views
How to create an File Dialog box in CustomTkinter?
Please review this code where I have used CustomTkinter (alias as "ctk") to create a button.
The "command" field contains a function "selectfile". I want to implement ...
1
vote
1
answer
121
views
Pystray icon inappropriate behavior with Tkinter window withdraw
Description:
So I am using customtkinter library instead of tkinter, the issue I am facing is that I want my tkinter app to be withdrawn when closed if the minimize window checkbox is checked in ...
1
vote
1
answer
65
views
Figure doesn't update after regeneration
I am trying to create an updating graph, I want to be able to control when and how often it updates. This graph will need to output data with specified time gaps as to not be too slow nor too fast ...
1
vote
2
answers
360
views
Updating customtkinter.frame()
For my app, I'm designing a frame switching system, but I don't know how to update the screen for when the user changes logins.
def show_frame(self, page_name):
'''Show a frame for the given ...
1
vote
1
answer
40
views
I have some buttons in customtkinter and they are not moving when I change position how would I achive my end result?
So I've been working on this random selector. I am trying to move the buttons to the positions I want them, but for some reason they are not moving. This is the code:
import random
import ...
1
vote
1
answer
1k
views
How would I set a background Image in customtkinter?
I want to set a png as the background image in a custokinter UI I have this code
import customtkinter
import random
from PIL import Image
import PIL
customtkinter.set_appearance_mode("light"...
1
vote
1
answer
92
views
Python garbage collector does not release images from memory when used with the Tkinter library
I'm relatively new to programming, I'm self-taught. I'm trying to create a program for sorting photos (using the keys that the user will select to move the photos to their pre-initialized folders).
My ...
1
vote
1
answer
731
views
Changing individual lines to different colors in a customtkinter textbox
I'd like to be able to change the color of text based on what the text contains in a CTkTextbox. I've been able to find something kind of similar in tkinter, "https://stackoverflow.com/questions/...
1
vote
1
answer
64
views
Chatbot with tkinter: labels not showing in the frame with scrollbar
I am working on simple chatbot app with GUI in tkinter.
GUI:
root = Tk()
root.title("Chatbot")
ico = Image.open('../assets/app_icon.png')
photo = ImageTk.PhotoImage(ico)
root.wm_iconphoto(...
1
vote
1
answer
106
views
how to clear a textbox in Python after button is pressed?
I'm starting in python and I have created this app to open a website after you write it in a textbox, but don't know how to clear it after the button is pressed, please help me...
Code:
import ...
1
vote
1
answer
381
views
Why is my CustomTkinter creating a blank window in addition to the one I created?
I'm trying to Create a new window in line 87. it creates the window and also a white one although I have created only one window
import customtkinter as ctk
import tkinter as tk
import tkinter.font as ...
1
vote
1
answer
100
views
Glitching text in an updating frame in customtkinter
In my program, I have a frame (in customtkinter), this frame updates to display new information each time a button is pressed. The issue is that some of the text is glitched after pressing more than 1-...
1
vote
1
answer
3k
views
CustomTkinter TabView
import customtkinter
customtkinter.set_appearance_mode("dark")
customtkinter.set_default_color_theme("green")
root = customtkinter.CTk()
root.title("CustomTkinter Tabview&...
1
vote
1
answer
892
views
Customtkinter button text wrapping (doesn't support wraplength attribute)
I'm using the customtkinter library to create a rounded button with an outline, this button can contain a variable length of text and the button itself should dynamically resize.
There is no ...
1
vote
1
answer
163
views
Python Tkinter - I can't replicate terminal output in Tkinters Label (GUI)
Within my class 'App', I wish to take the user input in the Tkinter EntryBox, and use it to get the definition using pythons PyDictionary module. Once done, I wish to display the output in a Tkinter ...
1
vote
1
answer
563
views
python tkinter updating the combo box programmatically
When I print the list that I am setting the Combobox to I am getting an updated list based on the available com ports, however the values in the drop down box are not working. I have a feeling that it ...
1
vote
2
answers
3k
views
I want to get the text from this variable using customtkinter
I want to get the text from this, How do I get it?
I've instaled tkniter, customtkinter but idk how to get the text from this
entry1=customtkinter.CTkEntry(master=frame, width=220, placeholder_text='...
1
vote
1
answer
459
views
storing output text in a tkinter textbox
im looking to output a list of text to both a text file as well as a tkinter textbox. Currently I have it working to print to a text file being held in the same folder. I would like this same list to ...
1
vote
1
answer
558
views
customtkinter Radiobutton does not change IntVar value
I try to run the following code. The main issue is, that I don't understand why when I make a different radiobutton active it doesn't change the entry placeholder_text.
I expected self.choice_var ...
1
vote
1
answer
81
views
Cutomtkinter label packs at bottom of a window instead of packing into set frame
I want to have a frame with labels inside the main application frame, but when I try to add a label to this frame the label is at bottom of the window instead.
Code:
class Main(CTk):
def __init__(...