-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathapp_sistemafic.py
More file actions
35 lines (27 loc) · 1.07 KB
/
app_sistemafic.py
File metadata and controls
35 lines (27 loc) · 1.07 KB
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
#Frame feito utilizando PySimpleGUI para simular um sistema de cadastro de clientes, desenvolvido por @devaprender
# instale o PySimpleGUI antes de rodar este arquivo:
# pip install PySimpleGUI
# para mac/linux
# pip3 install PySimpleGUI
import PySimpleGUI as sg
sg.theme('Reddit')
product_categories = ["Eletrônicos", "Móveis", "Roupas", "Brinquedos", "Comida", "Bebidas",
"Cosméticos", "Livros", "Esportes", "Jardinagem"]
layout = [
[sg.Text('Cliente',size=(6,0)),sg.Input(key='1',size=(20,0))],
[sg.Text('Produto',size=(6,0)),sg.Input(size=(20,0),key='2')],
[sg.Text('Quantidade'),sg.Input(key='3',size=(3,0))],
[sg.Text('Categoria do Produto'), sg.Combo(product_categories, key='4')],
[sg.Button('Salvar')]
]
window = sg.Window('Cadastro de Produtos',layout)
while True:
event, values = window.read()
if event == sg.WIN_CLOSED:
break
elif event == 'Salvar':
sg.popup('Produto Cadastrado')
window['1'].update('')
window['2'].update('')
window['3'].update('')
window['4'].update('')