[PYTHON IMAGE-SIG] viewer.py gives TclError on Unix (includes patch)

Fred L. Drake fdrake@CNRI.Reston.Va.US
Thu, 16 Jan 1997 09:32:14 -0500 (EST)


Fredrik Lundh wrote:
> The Script/viewer.py file only runs fine under Windows.  On a Unix
> box, it gives the following error:
> 
> 	TclError: unknown color name "systembuttonface"


  How about:

    label = Label()
    r, g, b = root.winfo_rgb(label['background'])
    rgb = r / 256, g / 256, b / 256
    label.destroy()

  This should work under NT as well; testing this is a long way from
convenient for me here.  The disadvantage is the creation of an
intermediate widget, but a suitable existing widget is likely to be
available in real applications.


  -Fred

--
Fred L. Drake, Jr.
fdrake@cnri.reston.va.us
Corporation for National Research Initiatives
1895 Preston White Drive
Reston, VA    20191-5434

_______________
IMAGE-SIG - SIG on Image Processing with Python

send messages to: image-sig@python.org
administrivia to: image-sig-request@python.org
_______________