[英]Python Gtk3, MessageDialog, default focused response after hiding dialog?
銷毀對話框后,我們可以使用set_default_response
方法創建具有默認焦點響應的新對話框。 但是當我們隱藏對話框而不是銷毀對話框時,此方法不起作用。 我怎樣才能做到這一點 ?
例
#dialog variable is a GtkMessage dialog.
dialog.run()
dialog.hide()
dialog.run() # default focus doesn't work when we run dialog again after hiding.
謝謝。
注意:很抱歉經常問問題
這不會發生,因為對話框窗口小部件將保持其狀態。 這是預期的行為。 如果銷毀並創建一個新的,它將被初始化。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.