I am trying to make a GUI element invisible by using visible=False. It appears that the update function works with every other attribute as well as for values s shown in the code below, except for the visible attribute. Specifically, although the program requests that element (2,2) become invisible, element (4,2) is becoming invisible. Any help with this will be greatly appreciated. Thanks
import PySimpleGUI as sg
layout = [[sg.B(' ', size=(8,4), key=(i,j)) for i in range(0,5)] for j in range(0,4)]
window = sg.Window('Trying to change attribute', layout).Finalize()
window.Maximize()
while True: # Event Loop
event, values = window.read()
print(event, values)
window[(1,1)].update(button_color=('blue','yellow'))
window[(2,2)].update(visible=False) ## Problem here
window[(3,3)].update('Hello')
if event in (None, 'Exit'):
break
current_marker = window[event].get_text()