NAME

Tk::ColorEntry - Entry widget with a Tk::PopColor widget attached.

SYNOPSIS

use Tk::ColorEntry;
my $entry = $window->ColorEntry->pack;

DESCRIPTION

Megawidget, inherits 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 Tk::ColorPop widget.

Pressing escape causes the ColorPop to widthdraw. If a pick operation is active cancels the pick operation instead.

OPTIONS

Switch: -command

Callback to be executed when a color is selected. The color is given as parameter.

Switch: -entryerrorcolor

Default value '#FF0000'. Foreground color of the entry when it's content is not a valid color.

Switch: -indborderwidth

Default value 2. Borderwidth of the indicator label.

Switch: -indicatorwidth

Default value 4. Width of the indicator label.

Switch: -indrelief

Default value 'sunken'. Relief of the indicator label.

Switch: -popborderwidth

Default value 1. Borderwidth of the ColorPop widget.

Switch: -poprelief

Default value 'raised'. Relief of the ColorPop widget.

Switch: -variable

Reference to the variable where the current value is held.

METHODS

get

Returns the contents of the entry widget if it is a valid color.

put($color)

$color becomes the content of the entry widget. Adjusts the sliders if $color is a valid color.

LICENSE

Same as Perl.

AUTHOR

Hans Jeuken (hanje at cpan dot org)

BUGS

Unknown. If you find any, please contact the author.