1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36
|
#!/usr/bin/perl -w
# $Id: entry,v 1.3 2013/07/14 22:53:31 tom Exp $
#
# Purpose:
# To demonstrate the Perl5 Cdk Entry Widget.
use strict;
#
# Load in the Cdk Extension.
#
use Cdk;
Cdk::init();
# Create a new entry object.
my $entry = new Cdk::Entry(
'Label' => "Type Anything: ",
'Width' => 20,
'Min' => 0,
'Max' => 256
);
# Activate the object.
my $info = $entry->activate();
# Check the results.
if ( !defined $info ) {
popupLabel( ["<C>You hit escape, nothing returned."] );
}
else {
popupLabel( ["<C>You typed in ($info)"] );
}
# Exit Cdk.
Cdk::end();
|