So I am having many issues with Pysimplegui's event loops, I'm trying to disable a button based on the lack of input in another part of the code (in this case it's the lack of selection of at least one checkbox if the radio button above is pressed [but I should apply the same logic if a folder is not selected]).
I tried looking everywhere and either I can't find a solution or people apparently manage to get through based on the cookbook (which I tried and can't).

The code i tried is the following:

This is the part regarding the Radio buttons:

```
layout_1 = [
# things before...
    [sg.Radio('CSV/JSON:', "OUTPUT", default=False, key='-OutputFile-', enable_events=True)],
    [sg.Checkbox('Output as CSV', key='-OutputCSV-', disabled=True)],
    [sg.Checkbox('Output as JSON', key='-OutputJSON-', disabled=True)],
    [sg.Text('Select a folder: ')], [sg.FolderBrowse(key='-Folder-')],
    [sg.Push(), sg.Column([[sg.Button("Submit", disabled=False, key='-Submit-'), sg.Cancel()]], element_justification='c'), sg.Push()]
]

window_2 = sg.Window('Info', layout_1, finalize = True)

```

Then I have this while loop, which in theory, should basically disable the ability to select the output if '-OutputFile-' is False and, in case none of the two available outputs available (CSV or JSON) are selected, disable the Submit button as well. Thing is the disabling of the choices works but the Submit button is never disabled and can't be clicked.

```
while True:
    event_2, values_table = window_2.read()
    if event_2 in (sg.WIN_CLOSE, 'Cancel', 'Submit', None):
        break
    elif event_2 == '-OutputFile-':
        window_2['-OutputJSON-'].update(disabled = False)
        window_2['-OutputCSV-'].update(disabled = False)
        if window_2['-OutputFile-'] and not window_2['-OutputCSV-'] and not window_2['-OutputJSON-']:
            window_2['-Submit-'].update(disabled=True)
            sg.popup('Select an output', keep_on_top=True)
    elif event_2 == '-OutputNone-':
        window_2['-OutputJSON-'].update(disabled=True)
        window_2['-OutputCSV-'].update(disabled=True)
window_2.close()

```

I should note that the code works without the part in the loop about the Submit button, but I need that part as well.

Another thing I tried is using is False instead of not in the part not working.

This is what the window looks like:
![This is what the window looks like](https://i.stack.imgur.com/vyqyE.jpg)

PS: there might be grammatical errors in the code, unfortunately I had to copy it by and, even if I checked, there might be some error.