Type of Issues (Enhancement, Error, Bug, Question)
If I use for example window.Read(timeout=500) and want to use set_tooltip in the main loop, the tooltip stays permanently:

I have also tried this proposed solution: #1402
I intend to check a status every few seconds and display the result in the tooltip.
If there is no workaround for this particular phenomenon, does anyone have any idea how to trigger/call a function if the window was inactive in background and becomes active again? I would really appreciate a solution or tip...
Operating System
Windows 10
Python version
3.7.5
PySimpleGUI Port and Version
PySimpleGUI TK 4.5.0.26
Your Experience Levels In Months or Years
8 MONTHS - Python programming experience
2 YEARS (JavaScript / PHP) - Programming experience overall
NO - Have used another Python GUI Framework (tkiner, Qt, etc) previously (yes/no is fine)?
You have completed these steps:
Code or partial code causing the problem
import PySimpleGUI as sg
import random
layout = [[sg.Text('This is a sample text.', key='_text_', tooltip='')],
[sg.Button('Exit')]]
window = sg.Window('Window Title', layout, finalize=True)
while True:
event, values = window.Read(timeout=500)
if event in (None, 'Exit'):
break
window['_text_'].set_tooltip(random.randint(500, 1000))
Type of Issues (Enhancement, Error, Bug, Question)
If I use for example

window.Read(timeout=500)and want to useset_tooltipin the main loop, the tooltip stays permanently:I have also tried this proposed solution: #1402
I intend to check a status every few seconds and display the result in the tooltip.
If there is no workaround for this particular phenomenon, does anyone have any idea how to trigger/call a function if the window was inactive in background and becomes active again? I would really appreciate a solution or tip...
Operating System
Windows 10
Python version
3.7.5
PySimpleGUI Port and Version
PySimpleGUI TK 4.5.0.26
Your Experience Levels In Months or Years
8 MONTHS - Python programming experience
2 YEARS (JavaScript / PHP) - Programming experience overall
NO - Have used another Python GUI Framework (tkiner, Qt, etc) previously (yes/no is fine)?
You have completed these steps:
Code or partial code causing the problem