Tk-ColorEntry
view release on metacpan or search on metacpan
lib/Tk/ColorEntry.pm view on Meta::CPAN
package Tk::ColorEntry;
use strict;
use warnings;
use vars qw($VERSION);
$VERSION = '0.11';
use Tk;
use base qw(Tk::Derived Tk::Frame);
Construct Tk::Widget 'ColorEntry';
require Tk::PopColor;
=head1 NAME
Tk::ColorEntry - Entry widget with a color selection facilities.
=head1 SYNOPSIS
use Tk::ColorEntry;
my $entry = $window->ColorEntry->pack;
=head1 DESCRIPTION
Megawidget, inherits L<Tk::Frame>
Tk::ColorEntry is an entry widget with a label packed to it's right.
The background color of the label is used as indicator for the current color.
Clicking the entry widget pops a L<Tk::ColorPop> widget.
Pressing escape causes the ColorPop to widthdraw. If a pick operation is active
cancels the pick operation instead.
=head1 OPTIONS
You can use many options of L<Tk::ColorPicker>.
=over 4
=item Switch: B<-command>
Callback to be executed when a color is selected. The color is given as parameter.
=item Switch: B<-entryerrorcolor>
Default value '#FF0000' (red). Foreground color of the entry
when it's content is not a valid color.
=item Switch: B<-indborderwidth>
Default value 2. Borderwidth of the indicator label.
=item Switch: B<-indicatorwidth>
Default value 4. Width of the indicator label.
=item Switch: B<-indrelief>
Default value 'sunken'. Relief of the indicator label.
=item Switch: B<-popcolor>
Sets and returns the reference to the PopColor widget to be used.
=item Switch: B<-variable>
Reference to the variable where the current value is held.
=back
( run in 1.192 second using v1.01-cache-2.11-cpan-d7a12ab2c7f )