[Tkinter-discuss] Tkinter vs Tk strangness

Daniel.Schep at srnl.doe.gov Daniel.Schep at srnl.doe.gov
Mon Oct 18 16:39:58 CEST 2010


Hello all. I've been working on a converting a program from Tcl to Python 
for maintainability reasons and ran into a very strange problem (on 
Windows XP, using classic theme, if that's relevant). I haven't been able 
to find it documented any where.

Essentially there is a permanent 'shadow' underneath disabled button text 
in Tkinter that is not permanent in Tk.

A set of codes that demonstrates this difference is:

Tcl:
button .b -text weird -state disabled -font "system 20" -bg blue2
pack .b

Python:
from Tkinter import *
r = Tk()
b = Button(r, text='weird', state=DISABLED, font="system 20", bg='blue2')
b.pack()


Here is a set of images that demonstrates the problem on my machine, with 
Python 2.5.6 from Python.org (which uses Tk 8.5.2.2) and Tcl 8.5.9 from 
ActiveState.

http://imgur.com/a/hzAJn/tkinter_vs_tk_weirdness

Thanks
- Daniel
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/tkinter-discuss/attachments/20101018/e7d82f1b/attachment.html>


More information about the Tkinter-discuss mailing list