SHARE
TWEET

Untitled

CSI_slesh Jan 18th, 2019 62 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #!/usr/bin/env python
  2. # -*- coding: utf-8 -*-
  3. from Tkinter import *
  4. from _classButtonTest_ import *
  5.  
  6. def b1(event):
  7.     pass
  8. def b3(event):
  9.  root.title("Правая кнопка мыши")
  10.  pass
  11.  
  12.  
  13. root = Tk()
  14. root.title('TEST')
  15. meny = Menu(root)
  16. root.config(menu = meny)
  17. root.minsize(width = 500, height=400)
  18.  
  19.  
  20.  
  21.  
  22. filemenu = Menu(meny, tearoff=0)
  23. filemenu.add_command(label="open")
  24. filemenu.add_command(label="save")
  25. filemenu.add_command(label="output",command=root.quit)
  26.  
  27.  
  28. root.bind('<Button-1>',b1)
  29. root.bind('<Button-3>',b3)
  30.  
  31.  
  32.  
  33.  
  34.  
  35.  
  36. meny.add_cascade(label="file", menu=filemenu)
  37.  
  38. root.mainloop()
RAW Paste Data
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