Justification setting for Input elements.... Finally can make tables! Demo fo tables

This commit is contained in:
MikeTheWatchGuy 2018-09-06 23:17:40 -04:00
parent 405bcf7cbc
commit ac44b5bdaa
2 changed files with 29 additions and 2 deletions

19
Demo_Table_Simulation.py Normal file
View file

@ -0,0 +1,19 @@
import PySimpleGUI as sg
def TableSimulation():
"""
Display data in a table format
"""
# sg.ChangeLookAndFeel('Dark')
layout = [[sg.T('Table Using Combos and Input Elements', font='Any 18')]]
for i in range(20):
inputs = [sg.In('{}{}'.format(i,j), size=(8, 1), pad=(1, 1), justification='right') for j in range(10)]
inputs = [sg.Combo(('Customer ID', 'Customer Name', 'Customer Info')), *inputs]
layout.append(inputs)
sg.FlexForm('Table').LayoutAndRead(layout)
TableSimulation()