CustomTkinter icon indicating copy to clipboard operation
CustomTkinter copied to clipboard

Scrollbars are broken

Open MrKleiner opened this issue 3 years ago • 3 comments

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

MrKleiner avatar Dec 02 '22 00:12 MrKleiner

Got reported in https://github.com/TomSchimansky/CustomTkinter/issues/711. I already fixed it and will upload version 5.0.2 soon.

TomSchimansky avatar Dec 02 '22 11:12 TomSchimansky

Got reported in #711. I already fixed it and will upload version 5.0.2 soon.

when will the update be?

daehwan5024 avatar Dec 03 '22 17:12 daehwan5024

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"]
  },

James46113 avatar Dec 04 '22 15:12 James46113

Fixed now with version 5.0.2.

TomSchimansky avatar Dec 06 '22 22:12 TomSchimansky