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 37
|
#!/usr/bin/perl -w
# $Id: scale,v 1.2 2002/07/27 20:11:17 tom Exp $
#
# Purpose:
# To demonstrate the Perl5 Cdk Scale Widget
#
# Initialize Cdk.
#
use Cdk;
Cdk::init();
# Create the scale object.
my $scale = new Cdk::Scale ('Label' => "</5>Pick A Number: ",
'Low' => 1,
'High' => 10);
# Activate the object.
my $number = $scale->activate ();
# Check the results.
if (!defined $number)
{
popupLabel (["<C>Escape hit. No number selected."]);
}
else
{
popupLabel (["<C>You selected $number"]);
}
# Exit Cdk.
Cdk::end();
# Print out the info.
print "\n\n\n";
print "Number Chosen: $number\n";
|