Re: EuGTK - size, position of a GtkWindow

new topic     » goto parent     » topic index » view thread      » older message » newer message
Jerry_Story said...

How do you get the width, height, x position, y position of a GtkWindow?

The best way to do this is probably to get get_geometry() of GdkWindow, http://www.pygtk.org/docs/pygtk/class-gdkwindow.html#method-gdkwindow--get-geometry

You'll need to obtain the GdkWindow of your GtkWindow first.

There is a get_position() method for GtkWindows. http://www.pygtk.org/docs/pygtk/class-gtkwindow.html#method-gtkwindow--get-position

You can also use the get_origin() method for GdkWindows, http://www.pygtk.org/docs/pygtk/class-gdkwindow.html#method-gdkwindow--get-origin

Jerry_Story said...

get_size() doesn't work on a GtkWindow.

It should work. See http://www.pygtk.org/docs/pygtk/class-gtkwindow.html#method-gtkwindow--get-size (note that some caveats of get_size() on a GtkWindow are stated in this link, and look at the mention of configure_event).

GdkWindow has its own get_position as well, http://www.pygtk.org/docs/pygtk/class-gdkwindow.html#method-gdkwindow--get-position

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu