My Popup opens behind the current open window, so unable to see the Popup. How to show the Popup on top of the current open window? Following is the sample code:
import PySimpleGUI as sg
# set global options for window
background = '#F0F0F0'
sg.SetOptions(background_color=background,
element_background_color=background,
text_element_background_color=background,
window_location=(0, 0),
margins=(0,0),
text_color = 'Black',
input_text_color ='Black',
button_color = ('Black', 'gainsboro'))
layout = [[sg.Button('Ok'), sg.Button('Cancel')]]
window = sg.Window('Test Window', grab_anywhere=False, size=(800, 480), return_keyboard_events=True, keep_on_top=True).Layout(layout).Finalize()
window.Maximize();
while True:
event, values = window.read()
if event in (None, 'Cancel'):
break
else:
sg.Popup('Ok clicked')
I tried Popup with keep_on_top=True but it's not working, window getting priority for show on top so Popup remains hidden behind the window. Is there any way to show Popup above the window?