I’m playing with the following code as shown in the “How to use PMW megawidgets”  site.  When I run this using Python 2.7, I get two windows:  the first has the two buttons and the counter, and a second Tk window displaying nothing overlying the first.   Numerous attempts at various changes result in the same thing.  Can anyone help explain this?



Paul Hudgens




from Tkinter import *


import Pmw

root = Tk()



dialog = Pmw.Dialog(

        title = 'Counter dialog',

        buttons = ('OK', 'Cancel'))

interior = dialog.interior()

counter = Pmw.Counter(interior)

counter.pack(padx = 10, pady = 10)