Tk-FcyEntry

 view release on metacpan or  search on metacpan

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

package Tk::FcyEntry;

use 5.008000;
use strict;
use warnings;

use Tk;
use Tk::Widget;
use Tk::Derived;
use Tk::Entry;

use base qw/ Tk::Derived Tk::Entry /;

{
    local($^W)=0;  # suppress Entry overriden warning
    Construct Tk::Widget 'Entry';
}

our $VERSION = '1.8';

=head1 NAME

Tk::FcyEntry - Entry that reflects its state in the background color

=head1 SYNOPSIS

  use Tk;
  use Tk::FcyEntry;	# replaces the standard Entry widget
  ...
  $fcye = $w->Entry( ... everything as usual ... );
  ...

=head1 DESCRIPTION

This module is deprecated. Use L<Tk::Entry> instead, it does the same thing.

B<FcyEntry> is like a normal L<Entry|Tk::Entry> widget except:

=over 4

=item *

default background color is 'white'

=item *

if the state of the widget is disabled the background color is set
to be the same as the normal background and the foreground used is
the same as the disabledForeground of a button. (xxx: still not true,
values hardcoded)

=back

=cut

sub Populate
  {
    my ($w,$args) = @_;

    $w->ConfigSpecs(
        '-state',     => ['METHOD',  'state',       'State',      'normal'],
        '-editcolor'  => ['PASSIVE', 'editColor',   'EditColor',  Tk::WHITE()],
        '-background' => ['PASSIVE', 'background',  'Background', Tk::NORMAL_BG()],
        '-foreground' => ['PASSIVE', 'foreground*,  *Foreground', Tk::BLACK()],
        'DEFAULT'     => ['SELF'],
	);
    $w;
};

sub state {
    my ($w) = shift;
    if (@_) {



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