Guest User

Untitled

a guest
Jan 19th, 2018
92
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.75 KB | None | 0 0
  1. mGui = Tk()
  2. ment = StringVar()
  3. mGui.protocol("WM_DELETE_WINDOW", callback)
  4.  
  5.  
  6. mGui.geometry('450x450+500+300')
  7. mGui.title('R6S Operator Randomizer | Closed Beta 5.0')
  8.  
  9. w1 = Label(text='Copyright © 2018 JMax. All rights reserved').place(x = 212,
  10. y = 430, width = 250)
  11.  
  12. img = ImageTk.PhotoImage(Image.open("Sledge.jpg"))
  13. panel = Label(mGui, image = img)
  14. panel.pack(side = "bottom", fill = "both", expand = "no")
  15.  
  16. def wpronostico():
  17. Child()
  18.  
  19. class Child(tk.Toplevel):
  20. def __init__(self):
  21. super().__init__(mGui)
  22. self.init_child()
  23.  
  24. def scelta(self):
  25. tk.Label(self, text='' + random.choice(code_list3)).place(x = 87, y = 110)
  26.  
  27. def init_child(self):
  28. self.title('Pronostico')
  29. self.geometry('200x200')
  30. tk.Button(self, text='Vincerai?', command=self.scelta).pack()
  31.  
  32. from tkinter import *
  33. from PIL import ImageTk, Image
  34.  
  35.  
  36. class Main(Tk):
  37. def __init__(self):
  38. super().__init__()
  39. self.geometry('250x250+500+300')
  40. self.title('Info')
  41. button_1 = Button(self, text='открыть окно', font='Times 12', command=self.started_create)
  42. button_1.place(x=0, y=0)
  43.  
  44. def started_create(self):
  45. self.top_level = Top()
  46. self.top_level.mainloop()
  47.  
  48.  
  49. class Top(Toplevel):
  50. def __init__(self):
  51. super().__init__()
  52. self.title('открытое окно')
  53. self.geometry('400x400')
  54. self.img = ImageTk.PhotoImage(Image.open("Sledge.jpg"))
  55. self.panel = Label(self, image=self.img)
  56. self.panel.pack(side="bottom", fill="both", expand="no")
  57. self.button = Button(self, text='открыть окно', font='Times 12', command=Top)
  58. self.button.place(x=0, y=0)
  59.  
  60.  
  61. if __name__ == "__main__":
  62. main = Main()
  63. main.mainloop()
Add Comment
Please, Sign In to add comment