Python GUI 库介绍-PySimpleGUI

1.pip install PySimpleGUI

2.coding

import PySimpleGUI as sg

layout =[
    [sg.Text("HELLO PySimpleGUI")],
    [sg.Text("姓名"),sg.InputText("张喆坤")],
    [sg.Text("性别"),sg.InputText("N\A")],
    [sg.Text("年龄"),sg.InputText("27")],
    [sg.Button("确定"),sg.Button("取消")],
]

window=sg.Window("Python gui",layout)
while True:
    envent,values=window.read()
    if envent ==None:
        break
window.close()

  

 

posted @ 2023-04-04 08:58  张喆坤  阅读(125)  评论(0编辑  收藏  举报