#!/usr/bin/env python import tkinter as T class SubWin(T.Toplevel): def __init__(self, *args, **kwargs): T.Toplevel.__init__(self, *args, **kwargs) self.title('Yeah') self.geometry('300x50') self.label = T.Label(self, text='Hallo Unterfenster.') self.label.pack(side=T.TOP) self.button = T.Button(self, text="Exit", command=self.destroy) self.button.pack(side=T.TOP) class MainWin(T.Tk): def __init__(self, *args, **kwargs): T.Tk.__init__(self, *args, **kwargs) self.button = T.Button(self, text="Exit", command=self.destroy) self.button.pack(side=T.TOP) self.button = T.Button(self, text="Subbie", command=self.subbie) self.button.pack(side=T.TOP) self.frame = T.Frame(self, relief='ridge', borderwidth=5) self.frame.pack(side=T.TOP, fill='both', expand=1) def subbie(self): SubWin() if __name__ == '__main__': MainWin().mainloop()