Tk-FileEntry

 view release on metacpan or  search on metacpan

lib/Tk/FileEntry.pm  view on Meta::CPAN

package Tk::FileEntry;

use 5.008008;
use strict;
use warnings;
use Tk;
use Tk::widgets qw/ Frame Derived Widget Label Entry Button /;
use base qw/ Tk::Derived Tk::Frame /;

our $VERSION = '2.4';

Construct Tk::Widget 'FileEntry';

my $FILEBITMAP = undef;

=head1 NAME

Tk::FileEntry - FileEntry widget with optional file selection box

=head1 SYNOPSIS

    use Tk::FileEntry;

    $fileentry = $parent->FileEntry(
        -filebitmap	=> BITMAP,
        -command	=> CALLBACK,
        -variable	=> SCALARREF,
	);

=head1 DESCRIPTION

FileEntry is a composite widget for choosing files.
It features a L<Tk::Label>, L<Tk::Entry>, and a L<Tk::Button>. 

When the button is clicked, a dialog for choosing a file will show up.
The path of the chosen file will be inserted into the entry widget.
The label is intended as caption for the entry widget.

This is useful if you want to provide a convenient way to select a
file path.




=head1 WIDGET-SPECIFIC OPTIONS

=over 4

=item C<Option:> B<-filebitmap>

=item C<Name:> B<fileBitmap>

=item C<Class:> B<FileBitmap>

Specifies the bitmap to be used for the button that invokes the File Dialog.

=item B<-command>

A callback that is executed when a file is chosen.

Pressing enter in the entry widget will execute this callback. See L<Tk::FileEntry/BINDINGS>.

=item B<-variable>

Reference to variable that will be bound to the value of the entry widget.
See C<Tk::options> for more details on C<-variable>.

=item B<-label>



( run in 0.461 second using v1.01-cache-2.11-cpan-d7a12ab2c7f )