Tkinter -- visibility

Wayne infotechsys at pivot.net
Sun Jan 28 15:44:55 EST 2001


Hello,
What I'm trying to do is manage the visibility of various
Frame widget that happen to be modules -- *.py.
I have three files named  Cntrl.py,  A.py, B.py  B.py.
When the user clicks a button I want to make that form visible.
In the Cntrl.py I have this
class Cntrl(A,B,C):
           def __init__(self, master,flag)
                   self.master = master
                   self.flag = flag
                  A__init__(self, self.master, flag)
                  B__init__(self, self.master, flag)
                  C__init__(self, self.master, flag)
def main(flag):
         root = Tk()
         aCntrl = Cntrl(root,flag)
         root.mainloop
if __name__ == "__main__"
        flag = 1
       main(flag)

The flag is used to let the other modules know that we
started from the Cntrl vs. testing each individual module.

Each of the modules, A,B, and C look somthing like  this-

class A:
         def __init__(self, master, flag):

                code to define the GUI.

                 if flag:
                     main(master,flag)

def main(master, flag)
        aA = A(master, flag)
         master.mainloop()

if __name__ == "__main__"
    root = Tk()
    flag = 0
    main(root,flag)

I use the place manager, and have looked at the method "place_forget".
>From what I gather all the widgets have to be visible at once.
Can somebody give be a hand here?
TIA
Wayne





More information about the Python-list mailing list