Re: Getting screen position
- From: Steve Fox <drfickle k-lug org>
- To: muppet <scott asofyet org>
- Cc: gtk-perl list <gtk-perl-list gnome org>
- Subject: Re: Getting screen position
- Date: 05 Dec 2002 14:38:19 -0600
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
please?
I greatly appreciate your assistance. Thanks.
---------------------------------------------------------------------
#!/usr/bin/perl -w
use Gtk;
Gtk->init;
my $window = new Gtk::Window;
$window->signal_connect("destroy", sub { buhbye($window); });
$window->show_all;
Gtk->main;
exit;
sub buhbye {
my $window = shift;
print $window->get_name()."\n";
my ($x, $y) = $window->get_position;
print "x: $x, y: $y\n";
Gtk::main_quit("Gtk");
}
--
Steve Fox
http://k-lug.org
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]