Major demo refresh.. switched everything to new function names, new design patterns

Out with the old, in with the new!!
This commit is contained in:
MikeTheWatchGuy 2018-09-24 18:01:00 -04:00
parent 2a06683383
commit a1f4c60271
68 changed files with 706 additions and 1863 deletions

View file

@ -1,5 +1,6 @@
import csv
import PySimpleGUI as sg
import sys
filename = sg.PopupGetFile('filename to open', no_window=True, file_types=(("CSV Files","*.csv"),))
# --- populate table with file contents --- #
@ -11,7 +12,7 @@ if filename is not None:
data = list(reader) # read everything else into a list of rows
except:
sg.PopupError('Error reading file')
exit(69)
sys.exit(69)
sg.SetOptions(element_padding=(0, 0))
@ -19,11 +20,8 @@ col_layout = [[sg.Table(values=data[1:][:], headings=[data[0][x] for x in range(
auto_size_columns=True, display_row_numbers=True, justification='right', size=(None, len(data)))]]
layout = [[sg.Column(col_layout, size=(1200,600), scrollable=True)],]
form = sg.FlexForm('Table', grab_anywhere=False)
form.Layout(layout)
window = sg.Window('Table', grab_anywhere=False).Layout(layout)
form.Finalize()
b, v = window.Read()
b, v = form.Read()
exit(69)
sys.exit(69)