Changing the appearance of a Scrollbar in tkinter (using ttk styles)

前端 未结 3 1336
南旧
南旧 2020-12-09 12:21

I was wondering if you could help me with a style options issue in ttk. I\'ve managed to change most of the basic ttk widgets to the style of my preference. I\'m only stuck

3条回答
  •  离开以前
    2020-12-09 12:52

    This does not appear to be possible in tkinter on Windows. The below answer says so: ScrolledText Scrollbar Color (Python Tkinter)

    Scrollbar documentation: http://infohost.nmt.edu/tcc/help/pubs/tkinter/web/scrollbar.html Supported style fields: http://infohost.nmt.edu/tcc/help/pubs/tkinter/web/ttk-Scrollbar.html

    I tried passing both 'background' and 'troughcolor' unsuccessfully on my Windows machine. I also tried applying the style to the general scrollbar: style.configure('TScrollbar', background="blue") None of my solutions worked.

    Also another forum post agrees that you can't style the scrollbar background here: http://www.gossamer-threads.com/lists/python/python/822292

提交回复
热议问题