G2A Many GEOs
SHARE
TWEET

Untitled

a guest Jan 23rd, 2020 105 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. import tkinter as tk
  2. from tkinter import Listbox
  3. from tkinter import Entry
  4.  
  5.  
  6. ventana = tk.Tk()
  7.  
  8. ventana.geometry("500x500")
  9.  
  10. var = tk.StringVar()
  11. var.set(tuple(range(100)))
  12.  
  13. lb = Listbox(ventana,width=27,height=27,listvariable=var)
  14.  
  15. def random(_):
  16.     value = lb.get(lb.curselection())
  17.     w = lb.winfo_width()
  18.     x = lb.winfo_x()
  19.     _, y, _, h = lb.bbox(lb.curselection())
  20.     entry = Entry(ventana)
  21.     entry.place(x=x,y=y,width=w,height=h)
  22.     entry.delete(0, tk.END)
  23.     entry.insert(0, value)
  24.  
  25.  
  26.  
  27.  
  28. def listBox():
  29.     lb.place(x=50,y=50)
  30.     lb.bind('<Double-Button-1>', random)
  31.  
  32.  
  33.  
  34.  
  35.  
  36.  
  37.  
  38.  
  39. listBox()
  40.  
  41. ventana.mainloop()
RAW Paste Data
Ledger Nano X - The secure hardware wallet
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Top