1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27
| #!usr/bin/perl
use strict;
use warnings;
use Tk;
use Tk::Balloon;
my $mw = MainWindow->new( -title => "Simple Balloon example" );
$mw->minsize(300,200);
my $button = $mw->Button(
-text => "Exit",
-command => sub { exit; }
)->pack;
my $msgarea = $mw->Label(
-borderwidth => 2,
-relief => 'groove'
)->pack(
-side => 'bottom',
-fill => 'x'
);
my $balloon = $mw->Balloon( -statusbar => $msgarea );
$balloon->attach(
$button,
-balloonmsg => "Fermer l'application\nLigne 2!",
-statusmsg => "Press the Button to exit the application"
);
$balloon->attach( $msgarea, -msg => 'Displays the help text for a widget' );
MainLoop; |