[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

Ruby-gnome/gtk and Positioning?

Marc Heiler

9/21/2006 9:38:00 AM

Not sure if this is the proper place to ask for a ruby-gtk/gnome
question, but in case its not you'd surely tell me so. :)

The question I have is, that aside from the constants like POS_NONE
(Example Code: main_window.set_window_position(Gtk::Window::POS_NONE) )
is there any other way to specify the precise location of a GTK app?
Specifically I'd like to place it at "top left" corner upon startup
of the ruby application, but I cant seem to be able to do
exactly that.

For quick reference, only 5 constants seem to be possible at:
http://ruby-gnome2.sourceforge.jp/hiki.cgi?Gtk%3A%3AWindo...

Thanks for any help-pointer in advance.

--
Posted via http://www.ruby-....

2 Answers

Paul Lutus

9/21/2006 4:14:00 PM

0

Marc Heiler wrote:

> Not sure if this is the proper place to ask for a ruby-gtk/gnome
> question, but in case its not you'd surely tell me so. :)
>
> The question I have is, that aside from the constants like POS_NONE
> (Example Code: main_window.set_window_position(Gtk::Window::POS_NONE) )
> is there any other way to specify the precise location of a GTK app?
> Specifically I'd like to place it at "top left" corner upon startup
> of the ruby application, but I cant seem to be able to do
> exactly that.

I apologize for what appears to be a digression, but I have been having
terrific success with the Qt library and Ruby, and I can position a desktop
frame wherever I please. I just looked at the GTK class description and it
appears that you cannot specify a particular window position.

--
Paul Lutus
http://www.ara...

Logan Capaldo

9/21/2006 11:23:00 PM

0

On Thu, Sep 21, 2006 at 06:38:19PM +0900, Marc Heiler wrote:
> Not sure if this is the proper place to ask for a ruby-gtk/gnome
> question, but in case its not you'd surely tell me so. :)
>
> The question I have is, that aside from the constants like POS_NONE
> (Example Code: main_window.set_window_position(Gtk::Window::POS_NONE) )
> is there any other way to specify the precise location of a GTK app?
> Specifically I'd like to place it at "top left" corner upon startup
> of the ruby application, but I cant seem to be able to do
> exactly that.
>
You are asking the wrong layer. The window manager has the final say in
any and all window placement. You can suggest, you can cajole, but you
can never demand, unless you have a way of talking to the WM directly.