From: Greg M. <gr...@in...> - 2006-02-07 18:09:18
|
Andrew, I think the problem may be with the Mac implementation of Tcl. I suspect this because Pmw is just a wrapper around pure Tcl. Just for fun, I have translated your code into Tcl. So could you run this on your Mac and see if we can rule out Pmw and python as the culprits. Run the enclosed program like this (assuming you have the Tcl interpreter "wish" installed on your machine): wish test.tcl If the same problem occurs, then you should take it up with the Tcl people. Greg On Mon 06 Feb 2006 at 04:26:09PM -0600, Kennedy, Andrew (GE Healthcare) wrote: > Hi folks, > > I'm having a problem with redrawing in the following context. I > have a Notebook, and one of the pages in that notebook defines > another Notebook. If you select the page that doesn't contain a > notebook, and then cause a redraw to take place (just change focus > away from the window), the controls from the page containing the > notebook show through into the current page. > > Here's some simple code that demonstrates the problem. Run the > code, pick Page 2, and then cause the window to lose focus and the > problem will be manifestly obvious. Any pointers with regards to > where I should look? Also cross-posted to the Python-Mac mailing > list. The problem only manifests itself on the Mac, the same code > under the PC or Linux environment will run without issue. > > System information... Mac OS X 10.3.9, Python 2.4.1 Framework > build, Tcl/Tk 8.4.6 Framework build, Pmw 1.2 > > Thanks very much, > Andrew > > > > import Tkinter > import Pmw > > root = Tkinter.Tk() > > nb1 = Pmw.NoteBook(root) > pg1 = nb1.add('Page 1') > pg2 = nb1.add('Page 2') > nb2 = Pmw.NoteBook(pg1) > pg3 = nb2.add('Page 3') > pg4 = nb2.add('Page 4') > button1 = Tkinter.Button(pg3,text='Button1',width=10) > button1.grid(row=0,column=0) > button2 = Tkinter.Button(pg2,text='Button2',width=20) > button2.pack() > nb2.pack(fill='both',expand=True) > nb1.pack(fill='both',expand=True) > > root.mainloop() > -- Greg McFarlane "For the millions, not the millionaires" |