Mudanças entre as edições de "Python:PySimpGUI"

De BrapciWiki
Ir para navegação Ir para pesquisar
 
Linha 2: Linha 2:
 
Para instalar a biblioteca
 
Para instalar a biblioteca
 
  pip install PySimpleGUI
 
  pip install PySimpleGUI
 +
 +
Documentação: [[https://www.pysimplegui.org/en/latest/ https://www.pysimplegui.org/en/latest/]]
  
 
== Exemplo
 
== Exemplo

Edição atual tal como às 19h35min de 21 de janeiro de 2023

PySimpGUI

Para instalar a biblioteca

pip install PySimpleGUI

Documentação: [https://www.pysimplegui.org/en/latest/]

== 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;