Tk-PopList
view release on metacpan or search on metacpan
lib/Tk/PopList.pm view on Meta::CPAN
package Tk::PopList;
=head1 NAME
Tk::PopList - Popping a selection list relative to a widget
=cut
use strict;
use warnings;
use vars qw($VERSION);
$VERSION = '0.14';
use base qw(Tk::Derived Tk::Poplevel);
use Tk;
require Tk::HList;
Construct Tk::Widget 'PopList';
=head1 SYNOPSIS
require Tk::PopList;
my $list = $window->PopList(@options,
-values => [qw/value1 value2 value3 value4/],
-widget => $somewidget,
);
$list->popUp;
=head1 DESCRIPTION
Inherits L<Tk::Poplevel>
This widget pops a listbox relative to the widget specified in the B<-widget> option.
It aligns its size and position to the widget.
You can specify B<-selectcall> to do something when you select an item. It gets the selected
item as parameter.
You can use the escape key to hide the list.
You can use the return key to select an item.
=head1 OPTIONS
=over 4
=item B<-filter>
Default value 0
Specifies if a filter entry is added. Practical for a long list of values.
=item B<-motionselect>
Default value 1
When set hoovering over a list item selects it.
=item B<-nofocus>
Default value false. If set the list widget will not take focus when popping up.
=item B<-selectcall>
Callback, called when a list item is selected.
=item B<-values>
List of possible values.
=back
=head1 KEYBINDINGS
( run in 1.938 second using v1.01-cache-2.11-cpan-d01c6094234 )