-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathsimple_example.py
More file actions
30 lines (24 loc) · 799 Bytes
/
simple_example.py
File metadata and controls
30 lines (24 loc) · 799 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
import PySimpleGUI as sg
contact_information_array = [
['Amith', '161 Magnolia St', '331-569'],
['John', '392 Butcher St', '243-897'],
['Amith', '3341 Columbus Ave', '998-731']
]
headings = ['Full Name', 'Address', 'Phone Number']
layout = [
[sg.Table(values=contact_information_array,
headings=headings,
max_col_width=35,
auto_size_columns=True,
display_row_numbers=True,
justification='right',
num_rows=10,
key='-TABLE-',
row_height=35)]
]
window = sg.Window("Contact Information Window", layout)
while True:
event, values = window.read()
if event == "Exit" or event == sg.WIN_CLOSED:
break
window.close()