[Python] Is there a substitute for ttkbootstrap.Style()?

Discussão em 'Python' iniciado por Stack, Setembro 2, 2025.

  1. Stack

    Stack Membro Participativo

    So recently I had refrain from using ttkbootstrap because it was cashing with my tkcalendar.

    But if I do stop using ttkbootstrap, my windows cannot have themes, which is one of the features of my app.

    So I was wondering if there was an alternative to ttkbootstrap.Style(), because I would like for my windows to still have themes without making problems with tkCalendar.

    The only part in my code that I need to change is this:

    class App:
    def __init__(self, root):
    self.root = root
    self.settings = load_settings()
    self.users = load_users()
    self.style = Style(theme=self.settings["theme"])


    Because I need a substitute for Style.

    Or, alternatively, I could find a way to make it so tkCalendar and ttkbootstrap don't have problems.

    This is the current fix I am using:

    class MyCalendar(Calendar):
    def __init__(self, *args, **kwargs):
    # ensure _properties exists so ttkbootstrap doesn't break it
    self._properties = {}
    super().__init__(*args, **kwargs)

    Continue reading...

Compartilhe esta Página