We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 81d67ee commit 1c50159Copy full SHA for 1c50159
xianhuan/pysimplegui/demo.py
@@ -0,0 +1,25 @@
1
+#!/usr/bin/env python3
2
+# -*- coding: utf-8 -*-
3
+"""
4
+@author: 闲欢
5
6
+import PySimpleGUI as sg
7
+
8
+layout = [
9
+ [sg.Text('一句话概括Python')],
10
+ [sg.Input(key='-INPUT111-')],
11
+ [sg.Input(key='-INPUT222-')],
12
+ [sg.Button('确认'), sg.Button('取消')],
13
+ [sg.Text('输出:'), sg.Text(key='-OUTPUT-')]
14
+]
15
+window = sg.Window('PySimpleGUI Demo', layout)
16
+while True:
17
+ event, values = window.read()
18
+ print(event)
19
+ print(values)
20
+ if event in (None, '取消'):
21
+ break
22
+ else:
23
+ window['-OUTPUT-'].update(values['-INPUT222-'])
24
+window.close()
25
0 commit comments