=head1 NAME Tk::Balloon - pop up help balloons. =for pm Tixish/Balloon.pm =for category Tix Extensions =head1 SYNOPSIS use Tk::Balloon; ... $b = $top->Balloon(-statusbar => $status_bar_widget); # Normal Balloon: $b->attach($widget, -balloonmsg => "Balloon help message", -statusmsg => "Status bar message"); # Balloon attached to entries in a menu widget: $b->attach($menu, -state => 'status', -msg => ['first menu entry', 'second menu entry', ... ], ); # Balloon attached to individual items in a canvas widget: $b->attach($canvas, -balloonposition => 'mouse', -msg => {'item1' => 'msg1', 'tag2' => 'msg2', ... }, ); # Balloon attached to items in a listbox widget: $b->attach($listbox, -balloonposition => 'mouse', -msg => ['first listbox element', '2nd listbox element', ... ], ); =head1 DESCRIPTION B provides the framework to create and attach help balloons to various widgets so that when the mouse pauses over the widget for more than a specified amount of time, a help balloon is popped up. =head2 Balloons and Menus or Listboxes If the balloon is attached to a B or B widget and the message arguments are array references, then each element in the array will be the message corresponding to a menu entry or listbox element. The balloon message will then be shown for the entry which the mouse pauses over. Otherwise it is assumed that the balloon is to be attached to the B or B as a whole. You can have separate status and balloon messages just like normal balloons. =head2 Balloons and Canvases If the balloon is attached to a B widget and the message arguments are hash references, then each hash key should correspond to a canvas item ID or tag and the associated value will correspond to the message for that canvas item. The balloon message will then be shown for the current item (the one at the position of the mouse). Otherwise it is assumed that the balloon is to be attached to the B as a whole. You can have separate status and balloon messages just like normal balloons. =head2 Balloons and HLists If the balloon is attached to a B widget and the message arguments are hash references, then each hash key should correspond to a HList path and the associated value will correspond to the message for that HList item. The balloon message will then be shown for the current item (the one at the position of the mouse). Otherwise it is assumed that the balloon is to be attached to the B as a whole. You can have separate status and balloon messages just like normal balloons. =head2 Balloon Position By default, the balloon pops up at the lower right side of the client. If it would extend outside the lower screen border, its positioned at the upper right side. If it would extend outside the right screen border it's shown on the lower left side of the client. If it would extend outside both the lower and the right screen border, it's positioned at the upper left side of the client. Thus, the little arrow always points to the attached client. =head1 OPTIONS B accepts all of the options that the B widget accepts. In addition, the following options are also recognized. =over 4 =item B<-initwait> Specifies the amount of time to wait without activity before popping up a help balloon. Specified in milliseconds. Defaults to 350 milliseconds. This applies to both the popped up balloon and the status bar message. =item B<-state> Can be one of B<'balloon'>, B<'status'>, B<'both'> or B<'none'> indicating that the help balloon, status bar help, both or none respectively should be activated when the mouse pauses over the client widget. Default is B<'both'>. =item B<-statusbar> Specifies the widget used to display the status message. This widget should accept the B<-text> option and is typically a B