PyGObject and glade send window to the front

假装没事ソ 提交于 2019-12-04 05:19:36

问题


im having some problems to send to the front a GTK window.

I have a main window (window_root) with a button that launches another window (window_programs).

with this commands:

window_root.hide()
window_programs.show()

then, in window_programs, i have a button that displays another window (window_list) with the command:

window_list.show()

window_list is modal.

The problem was that window_list appeared at the back of window_programs. so i did some research and i found window_list.show().

The problems is that window_list appears at the front, but when i click it window_programs comes to the front!

it makes some time that i'm looking for the solution, any help will be appreciated!


回答1:


You are looking for the transient-for property of the modal window (which should be available in Glade). If the modal window needs to be transient to either of the two other windows, then you need to use gtk_window_set_transient_for() as needed since the modal can only be transient for one window at a time.



来源:https://stackoverflow.com/questions/24128192/pygobject-and-glade-send-window-to-the-front

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!