Curses-Devkit
view release on metacpan or search on metacpan
examples/alphalist view on Meta::CPAN
#!../../../perl -w
#
# Purpose:
# To demonstrate the Perl5 Cdk Alphalist Widget.
#
# Load in the Cdk Extension.
#
use Cdk;
Cdk::init();
# Get the contents of the current directory.
my @info = qx (ls);
chomp @info;
# Create a new alphalist object.
my $alphalist = new Cdk::Alphalist ('Label' => "Type Anything:",
'Filler' => "</R/24>_",
'Height' => 20,
'Width' => 60,
'List' => \@info);
$alphalist->set ('BoxAttribute' => "</R>");
# Activate the object.
my $info = $alphalist->activate();
# Check the results...
if (! defined $info)
{
popupLabel (["<C>You hit escape to exit the widget."]);
}
else
{
popupLabel (["<C>You selected ($info)"]);
}
# Exit Cdk.
Cdk::end();
( run in 1.087 second using v1.01-cache-2.11-cpan-364913b4093 )