Cam wrote:
> Hello list,
> 
> The following little test program works as expected. But if you change 
> the line marked "----- Here ----" so it reads:
> 
>       self.Frame2 = Pmw.ScrolledFrame(self)
> 


The internal frame (the one sub-widgets go into) is not the scrolled
frame itself.  It should mention this in the Pmw docs... don't have then
handy atm


Change this:
 >      self.Frame2 = Pmw.ScrolledFrame(self)

to:

 >      self.Frame2 = Pmw.ScrolledFrame(self).interior()


Cheers
Martin


> then it blows up on an error deep inside Tkinter when attempting to 
> create the button mentioned on the following line. All I wanted to do 
> was trade a Frame for a ScrolledFrame. I'm stumped as to why it blows 
> up. Anybody out there know?
> 
> Thanks
> 
> Cam
> 
> ps I realize that in this example Frame2 is redundant. I encountered the 
> problem in a larger case. To generate the example shown below I stripped 
> out pretty much everything that wasn't necessary to demonstrate the problem.
> 
> - - - - -
> 
> import Pmw
> from Tkinter import *
> 
> class Test(Frame):
>      def __init__(self,Master=None,**kw):
>          apply(Frame.__init__,(self,Master),kw)
>          self.Frame2 = Frame(self) #<---- HERE ----
>          self.Frame2.pack(side='left')
>          self.Button1 = Button(self.Frame2)
>          self.Button1.pack(side='top')
> 
> Root = Tk()
> Pmw.initialise(Root)
> App = Test(Root)
> App.pack(expand='yes',fill='both')
> Root.geometry('640x480+10+10')
> Root.mainloop()
> _______________________________________________
> Tkinter-discuss mailing list
> Tkinter-discuss@python.org
> http://mail.python.org/mailman/listinfo/tkinter-discuss
> 

_______________________________________________
Tkinter-discuss mailing list
Tkinter-discuss@python.org
http://mail.python.org/mailman/listinfo/tkinter-discuss

Reply via email to