[Pythonmac-SIG] redraw problem with Notebook within Notebook on Mac OS X
Kennedy, Andrew (GE Healthcare)
Andrew.J.Kennedy at ge.com
Mon Feb 6 23:27:30 CET 2006
> 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 Pmw-general 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()
>
More information about the Pythonmac-SIG
mailing list