Advertisement
Guest User

qwewqe

a guest
May 25th, 2018
68
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.68 KB | None | 0 0
  1. from tkinter import *
  2. from tkinter import filedialog
  3. root = Tk()
  4.  
  5. def carregar_funcao():
  6. root.filename = filedialog.askopenfilename(initialdir = "/",title = "Selecione o arquivo TXT",filetypes = (("Txt Files","*.txt"),("all files","*.*")))
  7.  
  8. def insira_funcao():
  9. Inserir=Entry()
  10. Inserir.pack()
  11.  
  12. def mostra_funcao():
  13. Mostra=Listbox()
  14. Mostra.insert(1,"par")
  15. Mostra.insert(2,"impar")
  16. Mostra.insert(3,"soma")
  17. Mostra.insert(4,"subtracao")
  18. Mostra.pack()
  19.  
  20. def salva_funcao():
  21. print("Funcao salva ")
  22.  
  23. def edita_funcao():
  24. print("hi there, everyone!")
  25.  
  26. def executar_funcao():
  27. print("hi there, everyone!")
  28.  
  29. def seleciona_funcao():
  30. print("hi there, everyone!")
  31.  
  32. Carregar = Button()
  33. Carregar["text"] = "Carregar funcoes"
  34. Carregar["command"] = carregar_funcao
  35. Carregar.pack(side="top")
  36.  
  37. Inserir = Button()
  38. Inserir["text"] = "Inserir funcoes"
  39. Inserir["command"] = insira_funcao
  40. Inserir.pack()
  41.  
  42. Salva = Button()
  43. Salva["text"] = "Salva Funcoes"
  44. Salva["command"] = salva_funcao
  45. Salva.pack()
  46.  
  47. Mostra = Button()
  48. Mostra["text"] = "Mostrar Funcoes"
  49. Mostra["command"] = mostra_funcao
  50. Mostra.pack()
  51.  
  52. Edita = Button()
  53. Edita["text"] = "Edita Funcao"
  54. Edita["command"] = edita_funcao
  55. Edita.pack()
  56.  
  57. Testa = Button()
  58. Testa["text"] = "Testa Funcao"
  59. Testa["command"] = executar_funcao
  60. Testa.pack()
  61.  
  62. Seleciona = Button()
  63. Seleciona["text"] = "Ativa funcao"
  64. Seleciona["command"] = seleciona_funcao
  65. Seleciona.pack()
  66.  
  67.  
  68. Quit = tk.Button(self, text="QUIT", fg="red",
  69. command=root.destroy)
  70. Quit.pack(side="bottom")
  71.  
  72.  
  73.  
  74.  
  75.  
  76. root.mainloop()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement