Feb-29-2024, 10:05 PM
(This post was last modified: Mar-03-2024, 03:23 AM by CopperGenie.)
(POST CLOSED)
Hello! I'm using tkinter, customtkinter (ctk), and CTkScrollableDropdown (ctksd). This last library adds the ability to easily implement scrollable dropdown menus to various ctk elements. I followed ctksd's installation instructions, imported the library, and called the CTkScrollableDropdown class after my ctk element like in their example. However, I'm getting this error after I delete it with clear_screen_widgets(). And the error keeps spamming with every interaction with the GUI thereafter.
Hello! I'm using tkinter, customtkinter (ctk), and CTkScrollableDropdown (ctksd). This last library adds the ability to easily implement scrollable dropdown menus to various ctk elements. I followed ctksd's installation instructions, imported the library, and called the CTkScrollableDropdown class after my ctk element like in their example. However, I'm getting this error after I delete it with clear_screen_widgets(). And the error keeps spamming with every interaction with the GUI thereafter.
Error:Exception in Tkinter callback
Traceback (most recent call last):
File "C:\Users\walde\AppData\Local\Programs\Python\Python310\lib\tkinter\__init__.py", line 1921, in __call__
return self.func(*args)
File "C:\Users\walde\Desktop\Benjamin\Engineering\Contracts\20240202_client management software\src\v1\CTkScrollableDropdown\ctk_scrollable_dropdown.py", line 50, in <lambda>
self.attach.winfo_toplevel().bind('<Configure>', lambda e: self._withdraw() if not self.disable else None, add="+")
File "C:\Users\walde\Desktop\Benjamin\Engineering\Contracts\20240202_client management software\src\v1\CTkScrollableDropdown\ctk_scrollable_dropdown.py", line 140, in _withdraw
if self.winfo_viewable() and self.hide:
File "C:\Users\walde\AppData\Local\Programs\Python\Python310\lib\tkinter\__init__.py", line 1267, in winfo_viewable
self.tk.call('winfo', 'viewable', self._w))
_tkinter.TclError: bad window path name ".!ctkscrollabledropdown"
Here is my ctk combobox with subsequent ctksd class:import customtkinter as ctk import CTkScrollableDropdown as ctksd root = ctk.CTk() combobox_client_info_1 = ctk.CTkComboBox(master=root, values=client_name_list) combobox_client_info_1.place(relx=0.5, rely=0.33, relwidth=.4, anchor=tk.CENTER) combobox_client_info_1.bind("<Return>", goto_screen_client_info_2) # run command when enter key is pressed ctksd.CTkScrollableDropdown(combobox_client_info_1, values=client_name_list, justify="left", button_color="transparent", autocomplete=True) root.mainloop()I've seen this type of error when the parent/master widget can't be found, but I'm not sure if that's applicable here or how to resolve it. Does anyone have any ideas?