Search code examples
pythonwindowgtkpositioningpygtk

Python Window-positioning?


I tried to open a new window at the same position as another window.

My Code:

window2.set_position(window1.get_position())

But it doesn't work.


Solution

  • set_position just sets a general hint (e.g. center the window). You need the move method:

    window2.move(pos_x, pos_y)

    see here: http://faq.pygtk.org/index.py?req=show&file=faq10.003.htp