Re: Change mouse pointer to hourglass?

Torsten Schoenfeld wrote:

On Fri, 2004-08-13 at 00:21, Daniel Kasak wrote:
Is there any way to change the pointer to an hourglass?

Yes, use


For example:

 my $window = Gtk2::Window -> new();
 $window -> show_all();
 $window -> window -> set_cursor(Gtk2::Gdk::Cursor -> new("watch"));

I've got another issue now.
The mouse pointer change only takes effect *after* the rest of my code ( that the user is waiting for, hence the hourglass ) has finished.

I assume this has something do with with gtk only doing updates in 'idle' cycles. I found the following post in the archives that talks about something like this:

So, can I do something like this?

# turn on hourglass

Glib::Timeout->add (20, sub {
# do some stuff
# turn off hourglass
   return 0

Can I be assured that the code will only run once, or can it be triggered again before the 1st run is completed?

Daniel Kasak
IT Developer
NUS Consulting Group
Level 5, 77 Pacific Highway
North Sydney, NSW, Australia 2060
T: (+61) 2 9922-7676 / F: (+61) 2 9922 7989
email: dkasak nusconsulting com au
Title: CanIt Vote for ID 89538

The following links have been inserted by the NUS Consulting internal spam filter and are for NUS Consulting staff only
Not spam
Forget previous vote

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