开发者

Pygtk - How to center a window on a parent window border?

开发者 https://www.devze.com 2023-03-23 01:50 出处:网络
How can I make a child widget (in this case other window, a popup one) popup attached to the border of the parent window? I know I can center it in the parent with: gtk.Window.set_position(g开发者_C百

How can I make a child widget (in this case other window, a popup one) popup attached to the border of the parent window? I know I can center it in the parent with: gtk.Window.set_position(g开发者_C百科tk.WIN_POS_CENTER_ON_PARENT), but how can I make it popup in the border?


Solved...:P

I managed to solve it by using:

(x, y) = parent.get_position()

y1 = y+50

child.move(x, y1)

0

精彩评论

暂无评论...
验证码 换一张
取 消