#!/usr/bin/perl -w # $Id: fselect,v 1.2 2002/07/27 20:11:17 tom Exp $ # # Purpose: # To demonstrate the Perl5 Cdk file selector widget. # # Load in the Cdk Extension. # use Cdk; Cdk::init(); # Create the file selector. my $fselect = new Cdk::Fselect ('Label' => "Filename:", 'Filler' => "_", 'Height' => 0, 'Width' => 0); # Activate the object. $fselect->set ('ULChar' => "#"); my $filename = $fselect->activate(); # Check the results. if (! defined $filename) { popupLabel (["You hit escape. No file selected."]); } else { popupLabel (["You selected the following file", "($filename)"]); } # Exit Cdk. Cdk::end();