package ATR::Tk::UpdateFieldLabel;

use strict;
use warnings;
use base  qw(ATR::Tk::UpdateField Tk::Label);
Tk::Widget->Construct('UFLabel');

=head1 NAME

ATR::Tk::UpdateFieldLabel - data-tracking text display

=head1 DESCRIPTION

=cut

# $Id: UpdateFieldLabel.pm,v 1.1 2005/02/25 17:21:38 mca Exp $

#----------------------------------------------------------------------------

sub atrPopulatePost {
    my ($self, $args) = @_;

    # No idea why the default for this is not adequate: same problem
    # as SITk::Status, UpdateFieldButton, UpdateFieldEntry
    $self->ConfigSpecs(-foreground => [ 'SELF', 'Foreground', 'foreground', 'black'],
		       -normalcolour => [qw[METHOD NormalColour normalColour grey]],
		      );

    $self->SUPER::atrPopulatePost($args);
}

sub get { $_[0]->cget('-text') }

sub set { # XXX: prime for sending upstairs to UpdateField
    my ($self, $text) = @_;

    my $tv = $self->cget('-textvariable');
    $$tv = $text if $tv;
}


1;
