Position Gtk::Window where on the screen?

Hi,

Can I specify where my Application starts on the screen?

Like at x:5 px and y:10 px?

2011/10/11 Marc H. [email protected]:

Hi,

Hi.

Can I specify where my Application starts on the screen?

Like at x:5 px and y:10 px?

Try Gtk::Window#move(5, 10)

ruby-gnome2-devel-en mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ruby-gnome2-devel-en


Vincent C.

also check out Gtk::Window#gravity=, which changes where the points
specified in Gtk::Window#move are relative to… for example:

(win is a Gtk::Window)

win.gravity= Gdk::Window::GRAVITY_SOUTH_EAST
win.move(5, 10)

or

win.gravity= Gdk::Window::GRAVITY_SOUTH_WEST
win.move(2, Gdk.screen_height - (win.height_request + 2))

http://ruby-gnome2.sourceforge.jp/hiki.cgi?Gtk::Window
http://ruby-gnome2.sourceforge.jp/hiki.cgi?Gdk::Window#GdkGravity

  • j

Thank you both a lot!

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs