Questions tagged [customtkinter]

For questions about the Python library customtkinter which wraps the built-in Tkinter

customtkinter is a library for creating GUI programs which is based on the built-in Tkinter.

It was created by Tom Schimansky and is also available on GitHub.

372 questions
2
votes
2 answers

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, text = 'This is a label', text_font =('Verdana',…
leech
  • 367
  • 1
  • 4
  • 16
1
vote
2 answers

Reduce height of Scrollable Frame in CustomTKinter (Python)

Heys Guys, is there a way to set the height of the CTkScrollableFrame in the customtkinter library below 200 pixels? Short example: import customtkinter as ctk root = ctk.CTk() frame = ctk.CTkScrollableFrame(root,…
1
vote
2 answers

Strategies for Efficiently Organizing and Accessing Widgets in a customtkinter-based Python Project

I am currently working on a project using the customtkinter library. The complexity of the project has grown to a point where I'm having trouble locating the widgets. To address this, I plan to organize the widgets by importing them from a dedicated…
Py Linux
  • 21
  • 4
1
vote
1 answer

TKinter - File Upload Button, Change Color of Button

I have this code for TKinter and CustomTkinter to create a file upload button: def import_file_data(): v = tk.StringVar() global file_data csv_file_path = askopenfilename() v.set(csv_file_path) file_data =…
Tristan
  • 31
  • 4
1
vote
1 answer

Increase in speed on animated ctk window

I have made a piece of code, this code has a animated side panel. when I make it dissapear it works fine but when I make it reappear it kind of jumps and enters faster than it exited code. i changed the self.pos = self.start_c from self.pos =…
1
vote
1 answer

Customtkinter button animation

I have a challenge to be done in tkinter, customtkinter and as you can see in the code I made a function that when pressing the number "0" on the keyboard the function is called and the number is printed inside the Entry, but there is a problem. The…
DevStrom
  • 11
  • 2
1
vote
0 answers

TkInter 'invalid command "after" script" by using destroy(): is it safe using quit() and exit()?

I'm am using a mix of customtkinter and tkinter to program my software, based on MVC architecture. However, when quitting using the regular [x] button, I have the following error repeated mutliple times for different lambdas: while…
Willy Lutz
  • 134
  • 1
  • 1
  • 9
1
vote
1 answer

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(False, photo) #Window dimensions and position w_width,…
Milos
  • 35
  • 6
1
vote
1 answer

AttributeError and Widget Displacement When Swapping Instances in Python Tkinter Modular Chatbot

class ChatGptResponseFrame(CTkScrollableFrame): def __init__(self, master, width, height, user_interface_instance, **kwargs): super().__init__(master, **kwargs) self.configure(width=width, height=height, …
Elie Hacen
  • 372
  • 12
1
vote
0 answers

background color changes of customtkinter button when it get pressed and also text color changes

In my ctk (customtkinter) project, color of button changes when it gets pressed also text's color changes from white to black. When the button is pressed it calls gen_table which creates a ttkbootstrap table on ttkbootstrap window. Below are two…
kush_1244
  • 39
  • 3
1
vote
0 answers

CustomTkinter giving error after destroy a window

I have a window in customtkinter, version 5.20, with a button to destroy it: import customtkinter as ctk # window 1 window1 = ctk.CTk() window1.geometry('400x300') ctk.CTkButton(window1, text = 'Destroy', command = window1.destroy).pack(expand =…
Lory1502
  • 21
  • 3
1
vote
1 answer

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 correct. This is a project where many nested functions are called. I…
1
vote
1 answer

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 customtkinter import…
Joker87
  • 13
  • 4
1
vote
1 answer

pygame event does not work when embedded within tkinter window

The following code works perfect on a Windows OS though does not work on the raspberry pi. I'm looking for information as to why this is, I have scoured the web for a solution but cannot find one. from distutils.command.config import config import…
user1438082
  • 2,740
  • 10
  • 48
  • 82
1
vote
1 answer

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 font passwordNum = 0 visible = False textentry…
Latif
  • 9
  • 3
1
2
3
24 25