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 overlying the first displaying nothing.   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)