Re: changing cursor on a Gtk2::Window?

On Tue, 14 Nov 2006 08:23:20 -0500
Sean Dague <sean dague net> wrote:

I've been trying to figure out how to change the cursor to an hourglass on

 I've seen references to
Gtk2::Gdk::Window still having set_cursor, but I don't really grok how one
gets a Gtk2::Gdk::Window from a Gtk2::Window.

Well go up in the Gtk2::Window hierarchy to Gtk2::Widget

It's at the bottom of "perldoc Gtk2::Widget". 

The names of the available cursors are in "perldoc Gtk2::Gdk::Cursor".
I don't see an hourglass, but one of them might look like one.

   # change cursor
   $widget->window->set_cursor ( Gtk2::Gdk::Cursor -> new("watch") );
   # change it back
   $widget->window->set_cursor (undef);

I'm not really a human, but I play one on earth.

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