I didn't answer the last question.
When you update a Text element you replace the text in it. If you want to add text you will have to supply the original text + the addition:
When you update a Text element you replace the text in it. If you want to add text you will have to supply the original text + the addition:
rc = reverseComplement(seq) window['-OUTPUT-'].update('Reverse complement: ' + rc)but then you also need to expand it's size. Another option is of course to use the text as a label and add another text as output:
layout = [[sg.Text('Reverse complement:', size=(19,1)), sg.Text('',size=(15,1), key='-OUTPUT-')], [sg.Input(key='-IN-')], [sg.Button('Convert'), sg.Button('Exit'), sg.Button('Help')]]I also want to add that I neither meant to be patronizing in my previous answer (it does look like it), nor did I mean to boast. In the mentioned multimillion line applications I contributed but did of course not write all of it. My latest project was with PySimpleGUI and just 1000 lines of code but had I used another GUI framework it would have been several times that. What I appreciate in PySimpleGui is the simplicity. You get a lot of GUI with very few lines of code.