-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathmainWindow.py
39 lines (28 loc) · 898 Bytes
/
mainWindow.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
from tkinter import *
from tkinter.ttk import Combobox
import os
import calculator
def main():
window = Tk()
window.title("Calculadora Grafos")
window.geometry('870x500')
arrayFiles = []
path = "./graphs"
for files in os.listdir(path):
if files.endswith(".txt"):
arrayFiles.append(files)
combobox = Combobox(window)
combobox['values'] = arrayFiles
combobox.current(0)
combobox.place(x = 380, y = 60)
label = Label(window, text="Selecione o arquivo da matriz...", font=("Arial", 12))
label.place(x = 370, y = 20)
def show():
label['text'] = calculator.resultValues(combobox.get())
btn = Button(window, text = "Calcular informações...", command = show)
btn.place(x = 380, y = 100)
label = Label(window)
label.place(x = 50, y = 170)
window.mainloop()
if __name__ == "__main__":
main()