python - GTK focus-out-event -


I am showing a user a popup menu when they click OK.

According to the popup behavior, when I lose focus, I want to delete the popup (when the user clicks outside the popup window). For this, I tried to connect the " Focus-out Event " to the popup window using the glade. But for some reason, he is not removing the incident. I tried to print something on the terminal when the incident is removed, but nothing touches.

I am new to Python and GTK, and now I have no clue how to move forward.

#handler Focus Out to capture import DF on_popup_menu_add_attachment_focus_out_event (auto, * args): print ("delete popup .....")

Focus out-signal and its handler Enter image details here

I just changed the type as the top level and it worked!


Comments

Popular posts from this blog

java - Can't add JTree to JPanel of a JInternalFrame -

javascript - data.match(var) not working it seems -

javascript - How can I pause a jQuery .each() loop, while waiting for user input? -