[Tutor] Tkinter query?

Dave S pythontut at pusspaws.net
Wed Jul 13 14:03:13 CEST 2005


Dave S wrote:

>Hi all,
>
>Im on the Tkinter GUI learning curve :-) . Its going quite well - im
>reading O'reilly 'programming python' but I am unclear on the following
>
>I understand the standard form ie ...
>
>root = Tk()
>test = button(root, text = ..........).pack()
>etc
>
>I also understand ....
>
>independant_win = Toplevel(root)
>
>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 :-[
>
>Dave
>
>_______________________________________________
>Tutor maillist  -  Tutor at python.org
>http://mail.python.org/mailman/listinfo/tutor
>
>
>  
>
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() ?

Dave


More information about the Tutor mailing list