CustomTkinter
CustomTkinter copied to clipboard
Scrollbars are broken
CustomTkinter Version: 5.0.1 (installed with pip) Python Version: 3.10.4
Whenever I'm trying to add a scrollbar - it throws an error:
Traceback (most recent call last):
File "E:\!webdesign\cbtool\cbt.py", line 115, in <module>
spawn_tk()
File "E:\!webdesign\cbtool\cbt.py", line 99, in spawn_tk
customtkinter.CTkScrollbar(cbframe)
File "C:\Users\DrHax\AppData\Local\Programs\Python\Python310\lib\site-packages\customtkinter\windows\widgets\ctk_scrollbar.py", line 52, in __init__
self._button_color = ThemeManager.theme["CTkScrollbar"]["scrollbar_color"] if button_color is None else self._check_color_type(button_color)
KeyError: 'scrollbar_color'
I tried creating a clean file and pasting code from this Docs page there and it still throws an error. https://github.com/TomSchimansky/CustomTkinter/wiki/CTkScrollbar
Got reported in https://github.com/TomSchimansky/CustomTkinter/issues/711. I already fixed it and will upload version 5.0.2 soon.
Got reported in #711. I already fixed it and will upload version 5.0.2 soon.
when will the update be?
Until the patch comes out you can fix it yourself by changing the values in the themes files. It's just some names that are different. Change the scrollbar section from this:
"CTkScrollbar": {
"corner_radius": 1000,
"border_spacing": 4,
"fg_color": "transparent",
"button_color": ["gray55", "gray41"],
"button_hover_color": ["gray40", "gray53"]
},
To this:
"CTkScrollbar": {
"corner_radius": 1000,
"border_spacing": 4,
"fg_color": "transparent",
"scrollbar_color": ["gray55", "gray41"],
"scrollbar_hover_color": ["gray40", "gray53"]
},
Fixed now with version 5.0.2.