layout = [[sg.T('Table Test')]]
for i in range(20):
row = [sg.T(f'Row {i} ', size=(10,1))]
layout.append([sg.T(f'{i}{j}', size=(4,1), background_color='white', pad=(1,1)) for j in range(10)])
sg.FlexForm('Table').LayoutAndRead(layout)
There are 2 missing features that make this package not the best choice for database type operations:
1. Tables
2. Scrollable windows
There is no "table' widget I'm aware of in tkinter. I've looked at a few proposed solutions, but nothing has yet to rise to the top. The first step is to get the Column Element scrollable.
It should be noted that PySimpleGUI's primary mission is to implement "Simple GUIs".
If the problem / application has a GUI or could benefit from a GUI, then PySimpleGUI isn't a bad place to start. If it's not a fit, you can quickly rule it out and move on.
If the project looks like it may be a candidate, spend 2 minutes looking through the Cookbook for a rough match. Copy, paste, and run the Recipe code. Then it's a matter of modifying the code to match your application.
The goal is to make it trivial to add a decent look GUI to software. It would be nice to introduce students to GUIs sooner than later in education by making it easy enough for beginners.
My advice to you would be to jump in and try stuff. Make something run. Make anything run. Then modify it or even start over. Point is that you've got a working environment, a blank canvas.
If "tables" are a fundamental thing you need to interact with, then PySimpleGUI is not yet able to provide a way of doing this in an interactive way.
Displaying a table is relatively easy and the results are pretty good:
https://user-images.githubusercontent.com/13696193/44960497-c667fd80-ae…
Here is the code if you want to try it
layout = [[sg.T('Table Test')]]
for i in range(20):
row = [sg.T(f'Row {i} ', size=(10,1))]
layout.append([sg.T(f'{i}{j}', size=(4,1), background_color='white', pad=(1,1)) for j in range(10)])
sg.FlexForm('Table').LayoutAndRead(layout)
There are 2 missing features that make this package not the best choice for database type operations:
1. Tables
2. Scrollable windows
There is no "table' widget I'm aware of in tkinter. I've looked at a few proposed solutions, but nothing has yet to rise to the top. The first step is to get the Column Element scrollable.
It should be noted that PySimpleGUI's primary mission is to implement "Simple GUIs".