Displaying a popup before the main window
- From: Nicolas Courtel <courtel cena fr>
- To: gtk-perl-list gnome org
- Subject: Displaying a popup before the main window
- Date: Tue, 14 Sep 2010 19:58:46 +0200
Hello,
As my program needs a few seconds to start, I would like to display a
popup to tell the user that it's working.
Looks pretty simple, but for some reason the popup shows up empty, and I
can't figure out what I've done wrong.
I would be grateful for any clue, here's a short example which shows the
problem.
#!/usr/bin/perl -w
use strict;
use Gtk2 -init;
my $window = Gtk2::Window->new;
$window->set_title ("My window");
my $popup = Gtk2::MessageDialog->new ($window, 'destroy-with-parent',
'info',
'none', "Please wait for 10
seconds...");
$popup->show;
sleep 10;
my $label = Gtk2::Label->new ("Hello, world!");
$window->add ($label);
$popup->destroy;
$window->show_all;
Gtk2->main;
--
Nicolas
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]