Re: Getting screen position

On Thu, 2002-12-05 at 12:52, muppet wrote:

the Gtk2 docs say

I wish this was Gtk2 :) I like the convenience functions. I should have
mentioned I was doing Gtk+-1.2.

so, basically, you want to do

($x, $y) = $gtkwindow->window->get_position;

I tried that and it told me that I was calling get_position on an
undefined value.

Could you look at my test program and tell me where I'm being stupid

I greatly appreciate your assistance. Thanks.


#!/usr/bin/perl -w

use Gtk;


my $window = new Gtk::Window;
$window->signal_connect("destroy", sub { buhbye($window); });



sub buhbye {
        my $window = shift;

        print $window->get_name()."\n";

        my ($x, $y) = $window->get_position;

        print "x: $x, y: $y\n";



Steve Fox

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