Skip to content

possibility to change bg/fg of the tkinter text widget by appearance mode #466

Discussion options

You must be logged in to vote

This soulution works, but its have a lot of lines when you have more styles. In my case 9.

`def change_appearance_mode(new_appearance_mode):
global my_bg_color
customtkinter.set_appearance_mode(new_appearance_mode)

        if new_appearance_mode =="Light":                
            my_bg_color="gray87" # light
            my_fg_color="gray18"
        else:
            my_bg_color="gray18" # dark
            my_fg_color="gray90"

        ### DEPENDECY COLOR CHOOSER (hihlighted selected text)
        new_color_selection = open(dir+"\\themes\\A_last_color.txt","r")
        new_color_selection = new_color_selection.read()            

        if new_color_selection == "dark-blue":
         …

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by smokeflypaper
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
1 participant