Kent Johnson wrote: >Dave S wrote: > > >>>But I do not understand where Frame fits in to this ... ie >>> >>> >>> >>>from Tkinter import * >> >> >> >>>class Hello(Frame): >>> >>> def __init__(self, parent=None): >>> Frame.__init__(self, parent) >>> self.pack() >>> >>> >>>Why not just use 'class Hello(root)' ? Or have I missed the point :-[ >>> >>> >>OK am I right in thinging a 'Frame' always has a parent of a Tk() or >>possibly Toplevel() and its used to help in positioning a widget window >>with .pack() ? >> >> > >Yes, that is one use of Frame - to help with positioning groups of widgets. >
Ahh good > A Frame subclass also can be used to package a group of widgets as a reusable > whole > So you can subclass it - that makes sense >and as a place to put controller code that makes a group of widgets work >together. > > Haven't got to this bit yet, may bee in next chapter ... :-) >Kent > >_______________________________________________ >Tutor maillist - Tutor@python.org >http://mail.python.org/mailman/listinfo/tutor > > > > _______________________________________________ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor