[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: how do I set top level window position to x, y ?





--- On Fri, 11/21/08, Sergei Steshenko <sergstesh yahoo com> wrote:

> From: Sergei Steshenko <sergstesh yahoo com>
> Subject: how do I set top level window position to x, y ?
> To: gtk-perl-list gnome org
> Date: Friday, November 21, 2008, 5:36 PM
> Hello All,
> 
> going through 'man Gtk2::Window.3pm' I see
> existence of
> 
> (root_x, root_y) = $window->get_position
> 
> - that's OK, that's what I also need, but I see
> 
> $window->set_position ($position)
> $position (Gtk2::WindowPosition)
> 
> where 'Gtk2::WindowPosition' is:
> 
> "
>        enum Gtk2::WindowPosition
> 
> 
>        * 'none' / 'GTK_WIN_POS_NONE'
>        * 'center' / 'GTK_WIN_POS_CENTER'
>        * 'mouse' / 'GTK_WIN_POS_MOUSE'
>        * 'center-always' /
> 'GTK_WIN_POS_CENTER_ALWAYS'
>        * 'center-on-parent' /
> 'GTK_WIN_POS_CENTER_ON_PARENT'
> ".
> 
> So, I do not see a way to set top level window position to
> the desired
> x, y.
> 
> I checked the set_position function, it accepts just a
> string argument -
> like 'mouse', which works.
> 
> So, is there a method that would allow me to set window
> position to x, y ?
> 
> Thanks,
>   Sergei.
> 
> 

OK, it happens to be $window->move($x, $y) .

I.e. one has to move the window to a desired position upon creation.

Regards,
  Sergei.


      


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]