Tkinter scrollbar background color doesn't work

KL klu1024 at gmail.com
Mon Apr 19 12:35:50 EDT 2010


Tkinter scrollbar widget's "background" and "relief" options seem not
work.

The below is the codes I tried and the python/tk information:
===================

ActivePython 2.6.4.8 (ActiveState Software Inc.) based on
Python 2.6.4 (r264:75706, Nov  3 2009, 13:23:17) [MSC v.1500 32 bit
(Intel)] on
win32
>>> from Tkinter import *
>>> r=Tk()
>>> s=Scrollbar(r,bg="#000")
>>> s.grid()
>>> s['activebackground'] = "#000"
>>> s['relief'] = "sunken"
>>>
>>> TkVersion
8.5
>>> import sys
>>> sys.version
'2.6.4 (r264:75706, Nov  3 2009, 13:23:17) [MSC v.1500 32 bit
(Intel)]'
>>>



More information about the Python-list mailing list