Zentara, you are my hero. I still don't understand why they wrote the documentation the way they did, but that was the missing link I was looking for.
-----Original Message----- From: zentara To: [EMAIL PROTECTED] Sent: 4/7/02 10:54 AM Subject: Re: Calling all tk users On Fri, 5 Apr 2002 16:59:00 -0800 , [EMAIL PROTECTED] (Timothy Johnson) wrote: > >Hey, is there anybody out there than can give me a really short example of >retrieving text from an Entry box? I see in the documentation that you use >the $entry-gtget, but there aren't any syntax examples. > >What I have so far: > >use tk; >my $main = MainWindow->new(); >$main->minsize(100,100); >$main->configure( -background => 'white' ); >my $frame = $main->Frame()->pack( -fill => 'both' ); >my $entry = $frame->Entry()->pack( -side => 'left' ); >$entry->insert(0,'Default Text'); > >??? > >Drawing a window isn't very useful if I can't get information back from it. > #!/usr/bin/perl use Tk; $mw=tkinit; $t=$mw->Text->pack; $t->insert('end',"This is some\ntext to retrieve"); $mw->Button(-text=>'Print Text', -command=>sub{ print $t->get('1.0','end'),"\n"} )->pack(-fill=>'x'); MainLoop; -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -------------------------------------------------------------------------------- This email may contain confidential and privileged material for the sole use of the intended recipient. If you are not the intended recipient, please contact the sender and delete all copies. -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]