Problems with Pmw

Matthew Dixon Cowles matt at mondoinfo.com
Sun Jun 23 21:36:40 EDT 2002


On Sun, 23 Jun 2002 19:35:33 -0500, Mark Rivers
<rivers at cars.uchicago.edu> wrote:

> In a previous post I mistakenly attributed one problem to Pmw.Blt, while
> subsequent testing has shown that the problem has nothing to do with Blt, it
> is a problem (?) with Pmw.
> 
> The problem is illustrated by the following short script:
> ########################################
> from Tkinter import *
> import Pmw
> t1 = Tk()
> t2 = Tk()
> l = Label(t2, text='A label'); l.pack()
> b = Button(t2, text='Press me'); b.pack()
> e = Pmw.EntryField(t2, labelpos=W, label_text='Enter something'); e.pack()
> ########################################

[. . .]

> I think it should be legal to create multiple Tk() windows in an
> application, so this seems like a serious bug?

The usual way to create another window is with the Toplevel() call.  I
don't know whether the bug is in Tkinter's allowing a second Tk() call
or Pmw's assuming that no one ever makes a second Tk() call but you
shouldn't have a problem if you use Toplevel().

Regards,
Matt




More information about the Python-list mailing list