CTkScrollableDropdown icon indicating copy to clipboard operation
CTkScrollableDropdown copied to clipboard

When I use it with CTk Toplevel it doesn't work

Open jorgarmolina opened this issue 2 years ago • 14 comments

I have made a small program and I have used CTk SCrollable Dropdown, if I use it on the main screen (ctk.CTk) the control works fine but if I use it with (ctk.CTkToplevel) it does not work well.

jorgarmolina avatar Dec 24 '23 12:12 jorgarmolina

Also same issue here, in main window perfect, in toplevel not working what at all.

Greetings, Bartosz

BMP-TUD avatar Jan 08 '24 19:01 BMP-TUD

@BMP-TUD Please send an example, I am not facing any issue in windows

Akascape avatar Jan 09 '24 08:01 Akascape

I also have this problem, see the screenshot below. Execution of a sample program attached to CTkScrollableDropdown example.py

Przechwytywanie

manyinc avatar Jan 09 '24 23:01 manyinc

@manyinc Which version of customtkinter you are using?

Akascape avatar Jan 10 '24 04:01 Akascape

Sorry for not sending an example, the app is quite large, but @manyinc was able to reproduce it. And I am using version 5.2.1 of customtkinter

BMP-TUD avatar Jan 10 '24 11:01 BMP-TUD

Please update to the latest version of ctk and also download the latest CtkScrollableDropdown. Let me know if its still showing that error

Akascape avatar Jan 10 '24 11:01 Akascape

I updated both ctk and your code and now it shows a different error:

bad window path name ".!ctkscrollabledropdown2"
Exception in Tkinter callback
Traceback (most recent call last):
  File "C:\Users\...\Anaconda3\envs\database\Lib\tkinter\__init__.py", line 1962, in __call__
    return self.func(*args)
           ^^^^^^^^^^^^^^^^
  File "C:\Users\...\Anaconda3\envs\database\Lib\tkinter\__init__.py", line 861, in callit
    func(*args)
  File "C:\Users\...\Anaconda3\envs\database\Lib\site-packages\customtkinter\windows\ctk_toplevel.py", line 295, in _revert_withdraw_after_windows_set_titlebar_color
    self.state(self._state_before_windows_set_titlebar_color)  # other states
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\...\Anaconda3\envs\database\Lib\tkinter\__init__.py", line 2290, in wm_state
    return self.tk.call('wm', 'state', self._w, newstate)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
_tkinter.TclError: bad window path name ".!ctkscrollabledropdown2"

BMP-TUD avatar Jan 10 '24 13:01 BMP-TUD

@BMP-TU your python version? Maybe it's due to python version difference.

Akascape avatar Jan 10 '24 14:01 Akascape

My python version is 3.12.1, this indeed could be a problem, which version have you been using?

BMP-TUD avatar Jan 10 '24 14:01 BMP-TUD

@BMP-TU I am using 3.10, let me install the new version.

Akascape avatar Jan 10 '24 14:01 Akascape

@BMP-TUD NO issues in the latest version. It's probably because of deleted widgets where dropdown is not removed.

Akascape avatar Jan 10 '24 16:01 Akascape

@Akascape Thank you, updating customtkinter 4.5.1 -> 5.2.2 helped.

manyinc avatar Jan 10 '24 21:01 manyinc

@Akascape The option does not work "hover_color" please can you check ?

And hiding the dropdown menu after clicking the arrow does not work.

CTkScrollableDropdown(combobox, values=values, justify="left", hover_color="#10888c", button_color="transparent")

image

manyinc avatar Jan 10 '24 23:01 manyinc

@Akascape The option does not work "hover_color" please can you check ?

And hiding the dropdown menu after clicking the arrow does not work.

CTkScrollableDropdown(combobox, values=values, justify="left", hover_color="#10888c", button_color="transparent")

image

Same problem with "hover_color" attribute. @Akascape

monolith04 avatar Apr 22 '24 15:04 monolith04

Try the new version, I have fixed this issue.

Akascape avatar Jun 29 '24 10:06 Akascape