I'm trying to style a combobox widget scrollbar. I would like to set the trough color and size. I have been able set the size by changing the arrowsize parameter as in the code below. This is undesirable though because it changes all vertical scrollbars for all widgets. I would like to target specific widgets.
import tkinter as tk
import tkinter.ttk as ttk
class App(tk.Tk):
def __init__(self):
super().__init__()
self.rowconfigure(0, weight=1)
self.columnconfigure(0, weight=1)
self.title('Default Demo')
self.geometry('420x200')
style = ttk.Style()
style.configure('my.TCombobox', arrowsize=30)
style.configure('Vertical.TScrollbar', arrowsize=28)
# style.configure('my.TCombobox.Vertical.TScrollbar', arrowsize=28)
values = []
for idx in range(1, 50):
values.append(f'Testing-{idx}')
cbo = ttk.Combobox(self, values=values, style='my.TCombobox')
cbo.grid(ipady=5)
def main():
app = App()
app.mainloop()
if __name__ == '__main__':
main()