The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.

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

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.

-widget

Mandatory!

Reference to the widget the list should pop relative to.

Only available at create time.

METHODS

filter($filter)

Filters the list of values on $filter.

popDown

Hides the PopList.

popFlip

Hides the PopList if it shown. Shows the PopList if it is hidden.

Shows the PopList.

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 =item Tk::Toplevel =item Tk::Listbox