Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- from tkinter import *
- from tkinter import filedialog
- root = Tk()
- def carregar_funcao():
- root.filename = filedialog.askopenfilename(initialdir = "/",title = "Selecione o arquivo TXT",filetypes = (("Txt Files","*.txt"),("all files","*.*")))
- def insira_funcao():
- Inserir=Entry()
- Inserir.pack()
- def mostra_funcao():
- Mostra=Listbox()
- Mostra.insert(1,"par")
- Mostra.insert(2,"impar")
- Mostra.insert(3,"soma")
- Mostra.insert(4,"subtracao")
- Mostra.pack()
- def salva_funcao():
- print("Funcao salva ")
- def edita_funcao():
- print("hi there, everyone!")
- def executar_funcao():
- print("hi there, everyone!")
- def seleciona_funcao():
- print("hi there, everyone!")
- Carregar = Button()
- Carregar["text"] = "Carregar funcoes"
- Carregar["command"] = carregar_funcao
- Carregar.pack()
- Inserir = Button(text="inserir funcoes",command=insira_funcao)
- #Inserir["text"] = "Inserir funcoes"
- #Inserir["command"] = insira_funcao
- Inserir.pack()
- Salva = Button()
- Salva["text"] = "Salva Funcoes"
- Salva["command"] = salva_funcao
- Salva.pack()
- Mostra = Button()
- Mostra["text"] = "Mostrar Funcoes"
- Mostra["command"] = mostra_funcao
- Mostra.pack()
- Edita = Button()
- Edita["text"] = "Edita Funcao"
- Edita["command"] = edita_funcao
- Edita.pack()
- Testa = Button()
- Testa["text"] = "Testa Funcao"
- Testa["command"] = executar_funcao
- Testa.pack()
- Seleciona = Button()
- Seleciona["text"] = "Ativa funcao"
- Seleciona["command"] = seleciona_funcao
- Seleciona.pack()
- Quit = tk.Button(self, text="QUIT", fg="red",
- command=root.destroy)
- Quit.pack(side="bottom")
- root.mainloop()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement