Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
import PySimpleGUI as sg
layout = [ [ sg.Text("ファイル選択"),sg.InputText(),sg.FileBrowse() ] ,
[sg.Text("文字入力") ,sg.InputText("ここに文字入力",key ="-TEXT-")],
[sg.Checkbox("チェックボックス",key="CHECK-BOX-")],
[sg.Button("ボタン", key="-SAMPLE-BUTTON-")] ,
[sg.Listbox(["Sample A","Sample B","Sample C"],size=(50,5))],
[sg.Combo(["Sample D","Sample E","Sample F"])],
[sg.ProgressBar(1000,orientation="h",size=(20,20),key="progbar")],
]
window = sg.Window("Sample Window",layout)
i = 0;
while True:
event , values = window.read(timeout=0)
if event == sg.WIN_CLOSED or event == "-SAMPLE-BUTTON-":
break
window["progbar"].update_bar(i)
i += 1
window.close()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment