changing colour of ttk.Progressbar elements in the xpnative theme - python

前端 未结 1 1329
温柔的废话
温柔的废话 2021-01-22 10:00

I\'m using python 2.7 and TK to make a gui which accesses text files and uses data in them to do many things, but the one relevant here is sending a gchat message. Currently, I

相关标签:
1条回答
  • 2021-01-22 10:12

    Your first question is somewhat ambiguous, in that I'm not sure whether you are talking about controlling the look of the progress bar or the nature of the progress it is displaying.

    The nature of the progress bar is controlled via its value and its mode option (determinate progress bars are different from indeterminate ones; the former are controlled via the value, the latter just show that “something is happening”).

    The look of a progress bar is controlled by the overall theme. On Windows and Mac OS X, the default theme is the system theme meaning that the progress bar will look native, whatever that is. I've not experimented recently with themes on Linux so I forget what they look like there; switch themes with:

    # Switch to the included 'clam' theme
    s = ttk.Style()
    s.theme_use('clam')
    
    0 讨论(0)
提交回复
热议问题