639 questions
1
vote
0
answers
66
views
Python Customtkinter: Getting real widget size
I seem to be always getting 120 for both height and width, I don't know why it refuses to give me the real value for the width so I can make the maintain the height in a 16:9 ratio
# Monitor frame
...
Best practices
0
votes
2
replies
76
views
Trying to make it CTk, but STATE not working
I have this script in Tk and it works fine. I wanted to make it dark and add hover options, so I changed it to CTk, but now it's not working. Can someone please help me fix this? I have both scripts ...
2
votes
0
answers
118
views
Animating layout test with python
I'm having a little problem with this code! Basically, I'm testing a feature for a piece of software, and the idea was to animate these windows. So far, it's working fine. When the top window expands, ...
-2
votes
1
answer
77
views
CtkButton doesn't load images correctly
I have coded a python application for help me manage my works. For do this I need some buttons. I chose to use CustomTkinter because of the visual effect but mostly of the times the icons of the ...
0
votes
1
answer
95
views
Multiple screens | python custom Tkinter [closed]
In my Tkinter chatbot app, clicking the 'History' menu opens a new window every time. How can I make it so only one history window exists, and if it's already open, bring it to focus instead of ...
2
votes
1
answer
65
views
How to make CTkTabview occupy the whole window?
I have an issue where my CTkTabview only takes up ~2/3 of the screen vertically.
class App(customtkinter.CTk):
def __init__(self):
super().__init__()
self.grid_columnconfigure(0, ...
0
votes
1
answer
78
views
How to have a frame scroll both directions (horizontal and vertically) in customtkinter
I want a frame that scrolls both ways (horizontally and vertically). However, a normal CTkScrollableFrame only supports either vertical scrolling or horizontal scrolling, and I'm not sure what other ...
1
vote
1
answer
66
views
Tkinter invokes wm command when window destroyed after CTkMessagebox used
My application uses CustomTkinter and reads data on start up:
import customtkinter as ctk
from CTkMessagebox import CTkMessagebox
class App(ctk.CTk):
def __init__(self) -> None:
super()....
0
votes
0
answers
24
views
Relative position of widget is always wrong after the first one
So I have this widget class.
class TitledWidget(ctk.CTkFrame):
def __init__(self, parent, title="", **kwargs):
super().__init__(parent, **kwargs)
self.title = title
...
3
votes
2
answers
259
views
Python Customtkinter code remains running after GUI window is closed
I'm new to coding/Python started a few weeks ago and am learning by creating a basic app with Customtkinter (for the aesthetic) on Pycharm. The app has 2 Customtkinter windows, a login window (class ...
0
votes
0
answers
78
views
Can't figure out customtkinter favicon
This is a simple application I'm making that organizes folder, but that part works fine. I'm make a GUi for it using custom tkinter and cant figure out how to set the favicon, whatever I do just does ...
0
votes
1
answer
62
views
Approaches To Optimize Nested For Loops and Dataframe Creation?
I am not very experienced with coding but I am creating a customtkinter application style script where a user can input a specific type of html that contains diagnostic addresses and various ...
0
votes
0
answers
140
views
How to make a CTkTextbox auto-resize vertically to fit its content in CustomTkinter?
I'm using CustomTkinter to build a quiz interface. Each question is displayed in a CTkTextbox (lbl), and I want the textbox to automatically adjust its height (Y dimension) depending on the content, ...
0
votes
0
answers
66
views
filedialog doesn't return anything on second run
I'm working on a tkinter/customtkinter app to load data to MySQL. Below are the relevant classes. When I run this code to load a single file, I have no issues. The problem comes when I click self....
0
votes
1
answer
88
views
How to improve pack_forget() and pack() since they flicker the screen as widgets re-appear?
I have a small app using tkinter/customtkinter. When I click a drop down (CTkOptionMenu) it chooses a form to display and all other forms become hidden:
def show_selected_form(self, event):
...
0
votes
1
answer
157
views
How to add a separator for CTK Text Box?
I would like to add a separator line in between the entries of my text box but have not yet found a neat way of doing this.
I would also gladly appreciate any further comments on my code any ways to ...
1
vote
1
answer
57
views
CTk Text Snippet viewer - Can't pack in the right order
I am currently writing a little Text Adventure as a school project and am somewhat stuck on this problem.
Part of the setup needed:
self.frame = cTk.CTkFrame(self)
self.frame.place(...
0
votes
0
answers
58
views
Delay for displaying path in entry field after using filedialog from tkinter
I am working on my (in my eyes) first larger project. Until this moment I was writing only scripts up to 500 lines and I am creating an app for my team which is going to do some quality control so I ...
0
votes
0
answers
29
views
customtkinter ValueError: invalid literal for int() with base 10: '' [duplicate]
I wrote a simple program where need get number and do some math problem such as the perimeter and area of a triangle.
It shows an error:
Traceback (most recent call last):
File "D:\\AAA\\...
0
votes
1
answer
82
views
Window not being centered on the screen
I am having a problem in positioning the login window in center of my screen.
This is my code:
from customtkinter import *
from PIL import Image
from tkinter import messagebox
from views.registration ...
-1
votes
2
answers
59
views
Webbrowser Module Doesn't Work with Lists
I'm new(ish) to Python, and am trying to create a link manager software. I have ran into an issue in my code, however: apparently, the webbrowser module doesn't work with lists?
I tried doing simple ...
0
votes
0
answers
92
views
Python Borderless ttk.Treeview
I have a treeview that I don't want to have borders, I managed to do it with borderwidth=0, however when selecting an element the border reappears, I tried to put borderwidth=0 when selecting or ...
0
votes
1
answer
67
views
Storing data locally (tkinter) [duplicate]
I am making a program with various features. The program stores all the user's preferences (customtkinter string variables) in a .json file located in the same directory. However, when running it on ...
0
votes
1
answer
87
views
Creating a Custom class of Label and passing arguments from the main window with Custom TKinter and Python
I'm quite new to GUI and OOP, I really tried to figure out but I'm not able to find the solution.
I started a GUI project which started to be very messy very quickly. So I started to recreate from ...
0
votes
1
answer
70
views
Assigning a specific name to a Tkinter frame in a for loop using Python
I'm new to Python and GUI developmment.
I'm trying to display in a window a week planning. I have prepared a list of days, and I want to loop through to create a frame for each day :
This part is ok, ...
0
votes
0
answers
190
views
CustomTkinter + pywebview
I was wondering if there is a way how to implement the rendered "webview" into customTkinter frame?
import customtkinter
import webview
from customtkinter import CTk, CTkFrame
def ...
0
votes
1
answer
114
views
Issue using app.overrideredirect(True) in my CustomTkinter application
I'm using app.overrideredirect(True) in my customtkinter application to create a custom title bar. However, the application doesn't appear in the Windows taskbar. When I click outside the app, it ...
1
vote
0
answers
31
views
CTkScrollableFrame incompatible with pywinstyles.set_opacity
When using pywinstyles.set_opacity on a button that was created in CustomTkinter, it causes the background to be "transparent", just like it is supposed to be.
However this only works when I ...
0
votes
1
answer
192
views
CustomTkinter: Background of button with rounded corner still got edges
I used CTK to round the corners of my buttons, it did work, but not as expected.
In the background of the button, there is still something that doesn't get the round corners
Image to it
I don't see ...
-1
votes
2
answers
214
views
Using Python with CustomTkinter and having problems for labels
I'm trying to change the background of the label that its says "Welcome Back to Our Website!", its only shows me the background of the original windows. I saw before that, that specific ...
0
votes
1
answer
56
views
CTkButton - Pictures on Buttons do not show from beginning
I have one question related to pictures use with CTkButton to which I assign picture (.png) which is actually not shown from beginning of program run. It is shown just after I change "...
1
vote
2
answers
231
views
Aligning frames in tkinter python, (customtkinter)
I'm making an app in python, with the customtkinter library. I'm using the grid() widget manager. So far, I only have a few frames as the basic layout, but can't align them properly.
The issue is, ...
0
votes
0
answers
93
views
'Autofit' Columns Width - Python
I'm trying to make a 'autofit' column width and the code below works really fine, but only if Im not in the tabview that the autofit occurs. Is there anyway to workaround this?
from tkinter import ttk,...
0
votes
0
answers
104
views
The background image for my custom tkinter program will not appear
I am trying to put a background to my custom tkinter program. It has a main class that all my frames are add to. This same class has functions to make them appear. The problem is, is that instead of ...
0
votes
1
answer
215
views
How to center a CustomTkinter App on the screen?
The way I get it, scaling is dpi aware in customtkinter, but positioning is not?
It seems I need to set x_pos and y_pos regarding x+<x_pos>+<y_pos> in physical pixels (retrieved with e.g. ...
1
vote
1
answer
58
views
Issue with Toggling Sign of the Last Entered Number in Calculator Using ⁺∕₋ in Python
I am developing a calculator using Python. The problem I'm facing is that when I try to toggle the sign of the last number entered by the user using the ⁺∕₋ button, all similar numbers in the text get ...
-1
votes
1
answer
114
views
Ctk ComboBox glitching out
As you can see, my text goes over the arrow, how can i fix it?
this is my code:
class ComboBox(ctk.CTkComboBox):
def __init__(self, master):
super().__init__(master)
self.configure(...
0
votes
0
answers
80
views
CustomTkinter App Keeps the First Instance and Takes PC Memory
````
from pathlib import Path
from tkinter import Tk, Canvas, Entry, Button, PhotoImage
import time
import subprocess
import traceback
import sys
import logging
import os
import sys
def resource_path(...
0
votes
2
answers
120
views
How can I make a button inside of a frame affect something outside its own frame with Custom TKinter?
How can I make a button inside of a frame affect something outside its own frame? I am new to programming and have not been able to solve this problem on my own. Here is my code and some pictures ...
0
votes
1
answer
83
views
Python Tkinter Image problems
Every time I'm getting this error:
_tkinter.TclError: image "pyimage2" doesn't exist
When I want to execute this code:
self.frame1 = customtkinter.CTkFrame(self)
self.frame1.pack(fill="...
0
votes
1
answer
217
views
CustomTkinter with multiple tabs, frames and classes - get widget values
I have a ctk application with many widgets spread across multiple tabs and frames. The inputs are so extensive I would ultimately like the user to be able to save their entries to a named file and ...
1
vote
1
answer
143
views
Pillow/Python defaulting to 72 DPI on a Retina display - looks terrible. How can I achieve a higher DPI?
I have an issue when displaying images using Pillow on my Retina display. I have a folder of images that are 150x150 pixels, and when I try to display them with a circular mask, they appear pixelated ...
2
votes
1
answer
130
views
When running a customtkinter script in pycharm 3.12 window does not show up
I was trying to run a simple GUI script I learned (I am a beginner) and no window popped up with the GUI
this was the code,
import customtkinter
customtkinter.set_appearance_mode('dark')
...
0
votes
2
answers
80
views
I can't seem to get a function in one class to properly call a function in another class in tkinter - Python
I am having trouble getting this text box to print text when the button from Class3 is pressed. If I call the same function from Class2 then everything is fine. But from Class 3 not so much. I can ...
1
vote
0
answers
135
views
CTkComboBox Dropdown Closes Immediately for Large Lists
I'm using CustomTkinter to create a GUI in Python, and I'm facing an issue with the CTkComboBox widget. When I populate the ComboBox with a large list of items, the dropdown menu shows the options, ...
1
vote
1
answer
64
views
Set image (palplot) into Customtkinter button
How can I set an image (a palplot created with seaborn) into a Customtkinter button (CTkButton)?
In the following MWE, I created the button and the image but adding the image with image = image in the ...
1
vote
0
answers
140
views
How can i draw a route between two points selected from a list in tkintermapview
I've been trying to add an route line to a tkintermapview simple app, but i can't find a code that matches what i need i have a list with around 10 places that i need to calculate the distance in a ...
1
vote
0
answers
2k
views
Python: yt-dlp automatically using FFmpeg to merge audio and video files
I am writing a python script that downloads videos from YouTube using the yt-dlp library for downloading and customtkinter for building a user interface. What I want exactly is for the user to click a ...
1
vote
0
answers
31
views
how to override alt-escape key of windows in customtkinter toplevel
i am using customtkinter toplevel as a dropdown and want to override Alt-Escape behaviour of window for this top level how to? basically i dont want the window manager to cycle this toplevel like ...
1
vote
1
answer
80
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 ...