Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def showpopup(self, event, item):
- global r
- if str(event.type) == "Enter":
- r = tk.Tk()
- r.geometry("400x900+{:}+{:}".format(self.winfo_rootx()+840, self.winfo_rooty()))
- r.wm_title("Pop UP")
- r.overrideredirect(True)
- im = Image.open(os.path.join(images_db_dir, "a.png"))
- imaitem = ImageTk.PhotoImage(im)
- r.columnconfigure(0, weight=1)
- r.rowconfigure(0, weight=1)
- mf = tk.Frame(r)
- mf.grid(row = 0, column=0, sticky="nsew")
- mf.grid_columnconfigure(0, weight=1)
- f1, f2 = tk.Frame(mf, , tk.Frame(mf, background="red")
- f1.place(x=5, y=5, anchor="nw", width=390, height=390)
- f2.place(x=0, y=405, anchor="nw", width=400, height=400)
- l = tk.Label(f1, image = imaitem)
- l.image = imaitem
- l.grid()
- r.mainloop()
- elif str(event.type) == "Leave":
- r.destroy()
Add Comment
Please, Sign In to add comment