my $balloon = $mw->Balloon( [option => value);A basic option is -statusbar => $widget, where $widget is the name of the widget used to display the statusbar. The balloon is attached to a given widget by the attach method:
$balloon->attach($widget( [option => value);Options to the attach method are
#!perl
# file balloon.pl
use Tk;
use Tk::Balloon;
use strict;
use warnings;
my $mw = MainWindow->new;
$mw->title('Balloon help');
my $status = $mw->Label(-width => 25,
-height => 10,
-relief => 'sunken',
);
my $balloon = $mw->Balloon(-statusbar => $status);
my $exit = $mw->Button(-text => 'Exit',
-command => [$mw => 'destroy']);
$balloon->attach($exit,
-balloonmsg => 'Press here to exit',
-statusmsg => "The mouse is over\n the exit button",
);
$exit->pack;
$status->pack;
MainLoop;
In this case the $status widget is a Label widget.
The balloon widget is attached to the $exit
button, and when the cursor pauses over this button, a
balloon pops up with the indicated message, with a different
message appearing in the status window. A screenshot
of this example appears below.
Randy Kobes 2003-11-17