From: Dean N. W. <wil...@ll...> - 2004-09-14 13:08:57
|
Hi Greg, Thanks for responding back to my question.... Still no luck. I get the same results as .interior(). The tkFileDialog is appearing in from of the top level parent Frame instead of the Pmw.Dialog. If I replace tkFileDialog with Pmw.Dialog, then the Pmw.Dialog widget appears in front of the correct Pmw.Dialog widget. What is different between tkFileDialog and Pmw.Dialog? One works and the other doesn't as expected. Thanks again for your help. Best regards, Dean >Dean, > >You should use .component('hull') which gives you the outer Toplevel >widget. Calling .interior() gives you the Frame inside the Pmw.Dialog >where you can put your own widgets. > >Greg > >On Tue 14 Sep 2004 at 02:38:25AM -0700, Dean N. Williams wrote: > > >>Dear Pmw community, >> >> I am using tkFileDialog to open a file and to save a file. That is, >>"dialog = tkFileDialog.Open(master=master,filetypes=filetypes,title = >>'TextObject File Select')" and "sfile = tkFileDialog.asksaveasfilename( >>master=master, filetypes = filetypes,title = 'Save VCS TextObject to a >>File' )" >> >>In both cases, I call these two tkFileDialog from a "Pmw.Dialog". When I >>set the master to the dialog which calls tkFileDialog it give me an >>error stating that the dialog has no attribute 'tk'. >> >> File >>"/pcmdi/williams/wrk/cdat/lib/python2.3/site-packages/vcs/fonteditorgui.py", >>line 478, in evt_open_file >> dirfilename=dialog.show(initialdir=os.getcwd()) >> File >>"/pcmdi/williams/wrk/cdat/lib/python2.3/lib-tk/tkCommonDialog.py", line >>48, in show >> w = Frame(self.master) >> File "/pcmdi/williams/wrk/cdat/lib/python2.3/lib-tk/Tkinter.py", line >>2348, in __init__ >> Widget.__init__(self, master, 'frame', cnf, {}, extra) >> File "/pcmdi/williams/wrk/cdat/lib/python2.3/lib-tk/Tkinter.py", line >>1829, in __init__ >> BaseWidget._setup(self, master, cnf) >> File "/pcmdi/williams/wrk/cdat/lib/python2.3/lib-tk/Tkinter.py", line >>1807, in _setup >> self.tk = master.tk >>AttributeError: Dialog instance has no attribute 'tk' >> >>If is use ".interior()" of the Pmw.Dialog, which has 'tk', then the >>tkFileDialog appears on top of the wrong widget. Not the dialog widget >>which is its parent. >> >>How can I make the tkFileDialog appear on top of the Pmw.Dialog parent >>which called it? >> >>Thanks for any help... >> >>Best regards, >> Dean >> >> >> >> >>------------------------------------------------------- >>This SF.Net email is sponsored by: YOU BE THE JUDGE. Be one of 170 >>Project Admins to receive an Apple iPod Mini FREE for your judgement on >>who ports your project to Linux PPC the best. Sponsored by IBM. >>Deadline: Sept. 13. Go here: http://sf.net/ppc_contest.php >>_______________________________________________ >>Pmw-general mailing list >>Pmw...@li... >>https://lists.sourceforge.net/lists/listinfo/pmw-general >> >> > > > |