Demo entry 2372318

Hmm

   

Submitted by anonymous on Aug 16, 2015 at 07:24
Language: Python 3. Code size: 562 Bytes.

from tkinter import *

class vwin():
    def __init__(self,args,master=None):
        if type(args[3]) == type(self):
            self.window = Toplevel(args[3].window)
        elif args[3].lower() == 'tk':
            self.window = Tk()
        self.window.title(args[0])
        self.window.geometry(args[1])
        self.window.state(args[2])

    def mainloop():
        self.window.mainloop()



root = vwin(['Main Window','640x480+25+25','normal','Tk'])
sub = vwin(['Sub Window','640x480-25-25','normal',root])
root.window.mainloop()

This snippet took 0.00 seconds to highlight.

Back to the Entry List or Home.

Delete this entry (admin only).