package Tk::FloatEntry;
use strict;
BEGIN{use vars '$DEBUG';
$DEBUG=(defined($ENV{USER})and$ENV{USER}eq 'achx')?1:0;
print STDERR"tixGrid: debug = $DEBUG\n" if$DEBUG;}require Tk;
require Tk::Widget;
require Tk::Derived;
require Tk::Entry;
use vars qw($VERSION);
$VERSION = '3.006'; # $Id: //depot/Tk8/TixGrid/FloatEntry.pm#6 $
use base  qw(Tk::Derived Tk::Entry);
Construct Tk::Widget 'FloatEntry';
sub ClassInit{my($class,$mw)=@_;
$class->SUPER::ClassInit($mw);
$mw->bind($class,'<Return>','invoke');
$mw->bind($class,'<FocusIn>','FocusIn');
$class;}sub Populate{my($e,$args)=@_;
$e->ConfigSpecs(-value=>['METHOD','value','Value',undef],-highlightthickness=>[$e,'highlightThickness','HighlightThickness',0],-command=>['CALLBACK','command','Command',undef],);
print"FloatEntry Init: $e\n" if$DEBUG;
$e;}sub value{my$e=shift;
unless(@_){return$e->get}$e->delete(0,'end');
$e->insert(0,$_[0]);
$e->selection('from',0);
$e->selection('to','end');}sub invoke{my($e)=@_;
$e->Callback('-command',$e->get);}sub post{my($e,$x,$y,$dx,$dy)=@_;
$dx=$e->reqwidth  unless defined$dx;
$dy=$e->reqheight unless defined$dy;
$e->place('-x'=>$x,'-y'=>$y,-width=>$dx,-height=>$dy,-bordermode=>'ignore');
$e->raise;
$e->focus;}sub unpost{my($e)=@_;
$e->place('forget');}sub FocusIn{my($e)=@_;
{$e->focus;
$e->selection('from',0);
$e->selection('to','end');
$e->icursor('end');}}1;
__END__

