customtkinter

Accessing data object from multiple tkinter frames

Accessing data object from multiple tkinter frames Question: What I’m doing I’m writing a graph-viewing app. The user opens the app, clicks ‘Import’ in the sidebar, chooses a CSV file and then sees the graph embedded in the app. The user then clicks ‘Slice’ in the sidebar, and the app detects regions of the graph …

Total answers: 1

Counter always reseting

Counter always reseting Question: I have been trying to make a Python script that counts how many people are coming and going from your store. How it is supposed to work: you have a +1, and a -1 buttons; when someone comes in, you click +1, and when someone goes away, you do -1. What …

Total answers: 2

Unable to add image to customtkinter button

Unable to add image to customtkinter button Question: im trying to learn tkinter + customtkinter while creating a small project. I have taken bits and pieces of my code from multiple places.While trying to add an image to a ctkinter button, the following error pops up: Given image is not CTkImage but <class ‘PIL.ImageTk.PhotoImage’>. Image …

Total answers: 2

How to hide/show password with Custom Tkinter?

How to hide/show password with Custom Tkinter? Question: Can’t find any info about how to make password visible or hide with Custom Tkinter. import tkinter as tk import customtkinter def toggle_password(): if txt.cget(‘show’) == ”: txt.config(show=’*’) else: txt.config(show=”) root = tk.Tk() root.geometry("200×200") txt = customtkinter.CTkEntry(root, width=20) txt.pack() toggle_btn = customtkinter.CTkButton(root, text=’Show Password’, width=15, command=toggle_password) toggle_btn.pack() …

Total answers: 2

Does customtkinter CTkButton hover has event option?

Does customtkinter CTkButton hover has event option? Question: I want to perform an action when a mouse hover event occurred on customtkinter ctkbutton hover. is it yet implemented? Asked By: Prince D.Taylor || Source Answers: Per the CTkButton source code, the on_enter method is bound to the <Enter> event. This method is predominantly focused on …

Total answers: 1

_tkinter.TclError: can't delete Tcl command – customtkinter – custom prompt

_tkinter.TclError: can't delete Tcl command – customtkinter – custom prompt Question: 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 default value a countdown after which the …

Total answers: 1

How to stop Thread via button?

How to stop Thread via button? Question: I have a button that is supposed to stop a thread that is running a server function on another Python file. The solutions I’ve tried are as follows: Solution #1: Threading.Event mainmenu.py import server as serv #as in server.py import socket from threading import Thread import customtkinter as …

Total answers: 1

Is there a way to get "text" or "fg_color" value from custom Tkinter button widget?

Is there a way to get "text" or "fg_color" value from custom Tkinter button widget? Question: I have a customtkinter (CTk) button widget that, when pressed, sends an encoded message to a client depending on the button’s "text" value; in this case, if the button’s text is "Off", it sends the message "On" and vice …

Total answers: 1

Tkinter – how to dynamically create labels named by items in list?

Tkinter – how to dynamically create labels named by items in list? Question: Last time I programmed something when Basic was new to the world. Now I’ve dived into python and can’t figure out where I’m doing what wrong. The application I am creating loads a large amount of data, processes it and then displays …

Total answers: 2

Buttons not being placed inside the correct frame in tkinter

Buttons not being placed inside the correct frame in tkinter Question: I am a newbie trying to use tkinter to build a GUI for an application. So far, I have a frame that I’d like to put several buttons into. However, every time I attempt to position this button, it isn’t placed properly, being put …

Total answers: 1