Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ScrollBar BackGround #243

Open
FolkJet opened this issue Jul 27, 2024 · 4 comments
Open

ScrollBar BackGround #243

FolkJet opened this issue Jul 27, 2024 · 4 comments

Comments

@FolkJet
Copy link

FolkJet commented Jul 27, 2024

How can I change the background color of the scroll bar?

I wanted to change the color to red, for example.

I've attached the code and the image to make it easier.

I tried every way, but unfortunately I couldn't.

Sorry for the English, I'm using Google Translate

white

@ragardner
Copy link
Owner

Hello, I think there may be some issues changing the color on windows, I will let you know if I find a work around

@FolkJet
Copy link
Author

FolkJet commented Aug 18, 2024

Thank you very much.

@ragardner
Copy link
Owner

Hello, after a little testing and research I am unable to change the scroll bar colours on windows :(

@JonnyNOS
Copy link

i have done it some months ago
i think i just swapped the scrollbar for a CTkScrollbar and specified a bg color for it

like here in lines 349 - 357 in the sheet.py:

if ctk.get_appearance_mode() == "Dark": # <-- line inserted
            bg_color = "#363636"        # <-- line inserted
        else:                           # <-- line inserted
            bg_color = "#d6d6d6"        # <-- line inserted
        self.yscroll = ctk.CTkScrollbar(self, command=self.MT.set_yviews, orientation="vertical", fg_color=bg_color) # <-- changed
        self.xscroll = ctk.CTkScrollbar(self, command=self.MT.set_xviews, orientation="horizontal", fg_color=bg_color) # <-- changed
        if show_top_left:
            self.TL.grid(row=0, column=0)
        if show_table:

now the Scrollbar changes appearance according to the set up appearance-mode

let me know if that works for you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants