Aug-08-2018, 06:39 PM
(Aug-08-2018, 02:08 PM)PySimpleGUI Wrote: How does something like this look to you?
import PySimpleGUI as sg form = sg.FlexForm('Simple data entry form', use_dictionary=True) # begin with a blank form layout = [ [sg.Text('Please enter your Name, Address, Phone')], [sg.Text('Name', size=(15, 1)), sg.InputText('1', key='name')], [sg.Text('Address', size=(15, 1)), sg.InputText('2', key='address')], [sg.Text('Phone', size=(15, 1)), sg.InputText('3', key='phone')], [sg.Submit(), sg.Cancel()] ] button, values = form.LayoutAndRead(layout) sg.MsgBox(button, values['name'], values['address'], values['phone']) print(values)
that gives me an error
Output:Exception ignored in: <bound method FlexForm.__del__ of <PySimpleGUI.PySimpleGUI.FlexForm object at 0x7f13b17620f0>>
Traceback (most recent call last):
File "/home/brian/.local/lib/python3.5/site-packages/PySimpleGUI/PySimpleGUI.py", line 985, in __del__
for row in self.Rows:
AttributeError: 'FlexForm' object has no attribute 'Rows'
Traceback (most recent call last):
File "/tmp/tmp.py", line 10, in <module>
form = sg.FlexForm('Simple data entry form', use_dictionary=True) # begin with a blank form
TypeError: __init__() got an unexpected keyword argument 'use_dictionary'
PySimpleGUI was installed with pip