File: mentry

package info (click to toggle)
libcdk-perl 4.9.10-3
  • links: PTS, VCS
  • area: main
  • in suites: lenny
  • size: 884 kB
  • ctags: 414
  • sloc: perl: 6,419; makefile: 45; sh: 27
file content (38 lines) | stat: -rwxr-xr-x 622 bytes parent folder | download | duplicates (4)
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
38
#!/usr/bin/perl -w
# $Id: mentry,v 1.2 2002/07/27 20:11:17 tom Exp $

#
# Purpose:
#	To demonstrate the Perl5 Cdk Mentry Widget

#
# Load in the Cdk Extension.
#
use Cdk;

#
# Initialize Cdk.
#
Cdk::init();

# Create the multi-line entry object.
$mentry	= new Cdk::Mentry ('Label' => "</5>Filename: ",
				'Width' => 20,
				'Prows' => 5,
				'Lrows' => 10);

# Activate the object.
my $filename = $mentry->activate();

# Check the results.
if (!defined $filename)
{
   popupLabel (["<C>Escape hit. No information returned."]);
}
else
{
   popupLabel (["<C>You typed in", "<C>$filename"]);
}

# Shut down Cdk.
Cdk::end();