简体   繁体   中英

Python Gtk3, MessageDialog, default focused response after hiding dialog?

after destroying dialog we can create new one with default focused response using set_default_response method. but when we hide dialog instead of destroying, this method does not work. how can I do this ?

example

#dialog variable is a GtkMessage dialog.
dialog.run()
dialog.hide()
dialog.run() # default focus doesn't work when we run dialog again after hiding.

Thanks.

Note: sorry for asking questions frequently

This does not happen because the dialog widget will keep its state. This is the expected behavior. If you destroy and create a new one, it will be initialized.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM