Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- mGui = Tk()
- ment = StringVar()
- mGui.protocol("WM_DELETE_WINDOW", callback)
- mGui.geometry('450x450+500+300')
- mGui.title('R6S Operator Randomizer | Closed Beta 5.0')
- w1 = Label(text='Copyright © 2018 JMax. All rights reserved').place(x = 212,
- y = 430, width = 250)
- img = ImageTk.PhotoImage(Image.open("Sledge.jpg"))
- panel = Label(mGui, image = img)
- panel.pack(side = "bottom", fill = "both", expand = "no")
- def wpronostico():
- Child()
- class Child(tk.Toplevel):
- def __init__(self):
- super().__init__(mGui)
- self.init_child()
- def scelta(self):
- tk.Label(self, text='' + random.choice(code_list3)).place(x = 87, y = 110)
- def init_child(self):
- self.title('Pronostico')
- self.geometry('200x200')
- tk.Button(self, text='Vincerai?', command=self.scelta).pack()
- from tkinter import *
- from PIL import ImageTk, Image
- class Main(Tk):
- def __init__(self):
- super().__init__()
- self.geometry('250x250+500+300')
- self.title('Info')
- button_1 = Button(self, text='открыть окно', font='Times 12', command=self.started_create)
- button_1.place(x=0, y=0)
- def started_create(self):
- self.top_level = Top()
- self.top_level.mainloop()
- class Top(Toplevel):
- def __init__(self):
- super().__init__()
- self.title('открытое окно')
- self.geometry('400x400')
- self.img = ImageTk.PhotoImage(Image.open("Sledge.jpg"))
- self.panel = Label(self, image=self.img)
- self.panel.pack(side="bottom", fill="both", expand="no")
- self.button = Button(self, text='открыть окно', font='Times 12', command=Top)
- self.button.place(x=0, y=0)
- if __name__ == "__main__":
- main = Main()
- main.mainloop()
Add Comment
Please, Sign In to add comment