Tkinter support scrollbar look modification

In tkinter we cannot modify the look of scrollbars, there’s some codes that are meant to work (because they are not giving unknown attribute error) but which are changing nothing. Please support that fast as possible. To show you why i want that look at this window i’ve made:

As you see it would perfect if if i could change the scrollbars

See tkinter.ttk — Tk themed widgets — Python 3.9.1 documentation

style.configure(“RW.TLabel”, foreground=“red”, background=“black”)

    scrollbar = Scrollbar(DecodedTextBox, orient="vertical", command=DecodedTextBox.yview, cursor="arrow", style="RW.TLabel")
    scrollbar.pack(fill="y", side="right")
    DecodedTextBox.config(yscrollcommand=scrollbar.set)

    xscrollbar = Scrollbar(DecodedTextBox, orient="horizontal", command=DecodedTextBox.xview, cursor="arrow", style="RW.TLabel")
    xscrollbar.pack(fill="x", side="bottom")
    DecodedTextBox.config(xscrollcommand=xscrollbar.set)

it says unknown option ‘style’ in Scrollbar do you know why pls?

I checked a lots of other forum posts , all are saying that modifying scrollbars isn’t possible even by using ttk. So please support me in order to make them that add that function in the next updates

The documentation is lacking a lot of information, but the following works here:

from tkinter import *
from tkinter.ttk import *

app = Tk()
style = Style()
style.element_create('Fruitsalad.Horizontal.Scrollbar.trough', 'from', 'default')
style.element_create('Fruitsalad.Horizontal.Scrollbar.thumb', 'from', 'default')
style.element_create('Fruitsalad.Horizontal.Scrollbar.leftarrow', 'from', 'default')
style.element_create('Fruitsalad.Horizontal.Scrollbar.rightarrow', 'from', 'default')
style.element_create('Fruitsalad.Horizontal.Scrollbar.grip', 'from', 'default')
style.layout('Fruitsalad.Horizontal.TScrollbar',
    [
        ('Fruitsalad.Horizontal.Scrollbar.trough', {'children':
            [('Fruitsalad.Horizontal.Scrollbar.leftarrow', {'side': 'left', 'sticky': ''}),
             ('Fruitsalad.Horizontal.Scrollbar.rightarrow', {'side': 'right', 'sticky': ''}),
             ('Fruitsalad.Horizontal.Scrollbar.thumb', {'unit': '1', 'children':
                 [('Fruitsalad.Horizontal.Scrollbar.grip', {'sticky': ''})],
            'sticky': 'nswe'})],
            'sticky': 'we'}),
    ])
style.configure('Fruitsalad.Horizontal.TScrollbar',
    troughcolor='green',
    background='red',
    arrowcolor='white')
style.map('Fruitsalad.Horizontal.TScrollbar',
    background=[('pressed', '!disabled', 'pink'), ('active', 'orange')])
scrollbar = Scrollbar(app, orient='horizontal', style='Fruitsalad.Horizontal.TScrollbar')
scrollbar.place(width=150)
scrollbar.set(0.0, 0.5)

app.mainloop()

styled_ttk_scrollbar

thanks i will check that

It still does not work

In anyway even if it was working, Python must add an easier way, why background and foreground not working as meant to, as in other widgets? PLS SHARE THIS POST. THE MORE POPULAR IT IS, THE MORE IT IS CONSIDERED.

For examples you may want to take a look at GitHub - rdbende/Azure-ttk-theme: Azure theme is a beautiful and modern theme for ttk and https://www.reddit.com/r/Python/comments/lps11c/how_to_make_tkinter_look_modern_how_to_use_themes.

I tried azur’s theme on another widget but it didn’t work.