Mudanças entre as edições de "Python:PySimpGUI"
Ir para navegação
Ir para pesquisar
(Criou página com '=PySimpGUI= Para instalar a biblioteca pip install PySimpleGUI') |
|||
| Linha 2: | Linha 2: | ||
Para instalar a biblioteca | Para instalar a biblioteca | ||
pip install PySimpleGUI | pip install PySimpleGUI | ||
| + | |||
| + | == Exemplo | ||
| + | from PySimpleGUI import PySimpleGUI as sg | ||
| + | sg.theme('Reddit') | ||
| + | layout = [ | ||
| + | [sg.Text('Usuário'),sg.Input(key='user')], | ||
| + | [sg.Text('Senha'), sg.Input(key='pass', password_char='*')], | ||
| + | [sg.Button('Entrar')] | ||
| + | ] | ||
| + | Janela = sg.Window('Login',layout) | ||
| + | while True: | ||
| + | eventos, valores = Janela.read() | ||
| + | if eventos == sg.WINDOW_CLOSED: | ||
| + | break; | ||
Edição das 19h34min de 21 de janeiro de 2023
PySimpGUI
Para instalar a biblioteca
pip install PySimpleGUI
== Exemplo
from PySimpleGUI import PySimpleGUI as sg
sg.theme('Reddit')
layout = [
[sg.Text('Usuário'),sg.Input(key='user')],
[sg.Text('Senha'), sg.Input(key='pass', password_char='*')],
[sg.Button('Entrar')]
]
Janela = sg.Window('Login',layout)
while True:
eventos, valores = Janela.read()
if eventos == sg.WINDOW_CLOSED:
break;