Skip to content

Instantly share code, notes, and snippets.

@TomoG29
Created October 24, 2021 11:33
Show Gist options
  • Save TomoG29/7a7dcaeace2fece74708090499432ea7 to your computer and use it in GitHub Desktop.
Save TomoG29/7a7dcaeace2fece74708090499432ea7 to your computer and use it in GitHub Desktop.
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