Is there a way to assign different styles to different Tk windows? #259
Replies: 4 comments 9 replies
-
Hi. As far as I know there can be only one ttk style running on an app at a given time. However, if you know of a way to do this in regular ttk, please post a reproducible example. I'd love to see it. In ttkbootstrap, the import ttkbootstrap as ttk
window = ttk.Window()
window.style.theme_use("darkly")
# also
style = ttk.Style()
style = ttk.Style.get_instance() https://ttkbootstrap.readthedocs.io/en/latest/api/style/style/ |
Beta Was this translation helpful? Give feedback.
-
In fact, what I am trying to do is not to use two different themes, but to create two separate windows with the same theme. But, as far as I know, one style manager can only deal with one window, so I need two style managers.
On Apr 20, 2022, at 8:54 AM, Israel Dryer ***@***.***> wrote:
Can you describe some scenarios in which you would need to use more than one theme at the same time? It seems like a very small use case.
—
Reply to this email directly, view it on GitHub<#259 (reply in thread)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/AW666YLX4CX3C7R4TIS3AYDVF5IVLANCNFSM5TY45CAA>.
You are receiving this because you authored the thread.Message ID: ***@***.***>
|
Beta Was this translation helpful? Give feedback.
-
Just know, I have worked out a way to do this. I will upload it later.
(:D
On Apr 20, 2022, at 10:01 AM, Zou Yuankun ***@***.***> wrote:
In fact, what I am trying to do is not to use two different themes, but to create two separate windows with the same theme. But, as far as I know, one style manager can only deal with one window, so I need two style managers.
On Apr 20, 2022, at 8:54 AM, Israel Dryer ***@***.***> wrote:
Can you describe some scenarios in which you would need to use more than one theme at the same time? It seems like a very small use case.
—
Reply to this email directly, view it on GitHub<#259 (reply in thread)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/AW666YLX4CX3C7R4TIS3AYDVF5IVLANCNFSM5TY45CAA>.
You are receiving this because you authored the thread.Message ID: ***@***.***>
|
Beta Was this translation helpful? Give feedback.
-
OK. I have created a new fork to do this. |
Beta Was this translation helpful? Give feedback.
-
Hello,
In the original ttk, I usually use “Style(root)” to access the style of a specific window. However, it seems that ttkbootstrap doesn’t support this. So, I wonder if there is another way to do this.
Thank you!
Beta Was this translation helpful? Give feedback.
All reactions