I'm having some problems with Title bars not showing up when using Pmw.Dialog boxes. This makes it so that you can't move the window around, since you can't grab the title bar.
I'm running Python 2.7.5 and Pmw 1.3.3 through Cygwin64, on a Windows 8 computer. When I run on pure windows (using the Windows version of Python 2.7.3 and Pmw 1.3.3), I do NOT have this same problem.
Has anyone seen this before, and do you know what I can do to fix it?
I have included a simple demo program below, where I experience this problem (it is part of a demo from the Pmw reference pages). The FIRST time I click the "Show Application" button, the dialog window that pops up is missing the title bar. However if I close the dialog button and click "Show Application" again, the title bar appears as normal.
#!/usr/bin/pythonimportTkinterimportPmwclassDemo:def__init__(self,parent):# Create button to launch the dialog.w=Tkinter.Button(parent,text='Show application modal dialog',command=self.showAppModal)w.pack(padx=8,pady=8)# Create the dialog.self.dialog=Pmw.Dialog(parent,buttons=('OK','Apply','Cancel','Help'),defaultbutton='OK',title='My dialog',command=self.execute)self.dialog.withdraw()# Add some contents to the dialog.w=Tkinter.Label(self.dialog.interior(),text='Pmw Dialog\n(put your widgets here)',background='black',foreground='white',pady=20)w.pack(expand=1,fill='both',padx=4,pady=4)defshowAppModal(self):self.dialog.activate(geometry='centerscreenalways')defexecute(self,result):print'You clicked on',resultifresultnotin('Apply','Help'):self.dialog.deactivate(result)root=Tkinter.Tk()Pmw.initialise(root)myDemo=Demo(root)root.mainloop()
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi again all. Just wanted to follow this up, in case someone else runs into the same issue. I found a work-around, which does a "refresh" of the title-less Dialog window, and this works. I just have to kill the Dialog, and launch it again, and the second time the title shows up. So I replaced the "showAppModal" function above with the following:
Hi all
I'm having some problems with Title bars not showing up when using Pmw.Dialog boxes. This makes it so that you can't move the window around, since you can't grab the title bar.
I'm running Python 2.7.5 and Pmw 1.3.3 through Cygwin64, on a Windows 8 computer. When I run on pure windows (using the Windows version of Python 2.7.3 and Pmw 1.3.3), I do NOT have this same problem.
Has anyone seen this before, and do you know what I can do to fix it?
I have included a simple demo program below, where I experience this problem (it is part of a demo from the Pmw reference pages). The FIRST time I click the "Show Application" button, the dialog window that pops up is missing the title bar. However if I close the dialog button and click "Show Application" again, the title bar appears as normal.
Any help with this would be greatly appreciated!
Thank you
Emma
Hi again all. Just wanted to follow this up, in case someone else runs into the same issue. I found a work-around, which does a "refresh" of the title-less Dialog window, and this works. I just have to kill the Dialog, and launch it again, and the second time the title shows up. So I replaced the "showAppModal" function above with the following: