NAME

Tk::PopList - Popping a selection list relative to a widget

SYNOPSIS

require Tk::PopList;
my $list = $window->PopList(@options,
   -values => [qw/value1 value2 value3 value4/],
   -widget => $somewidget,
);
$list->popUp;

DESCRIPTION

Inherits Tk::Poplevel

This widget pops a listbox relative to the widget specified in the -widget option. It aligns its size and position to the widget.

You can specify -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.

OPTIONS

-filter

Default value 0

Specifies if a filter entry is added. Practical for a long list of values.

-motionselect

Default value 1

When set hoovering over a list item selects it.

-selectcall

Callback, called when a list item is selected.

-values

List of possible values.

KEYBINDINGS

    <Down>       Moves selection to the next item in the list.
    <End>        Moves selection to the last item in the list.
    <Escape>     Hides the poplist.
    <Home>       Moves selection to the first item in the list.
    <Return>     Selects the current selection and hides the poplist.
    <Up>         Moves selection to the previous item in the list.

METHODS

filter($filter)

Filters the list of values on $filter.

LICENSE

Same as Perl.

AUTHOR

Hans Jeuken (hanje at cpan dot org)

BUGS

Unknown. If you find any, please contact the author.

SEE ALSO

Tk
Tk::Poplevel
Tk::Toplevel
Tk::Listbox