FireBird34 has asked for the wisdom of the Perl Monks concerning the following question:

I've spent the past few hours looking around the 'Net and through the documents, but can't find anything, so I am now here. How would I set a variable for Text()? example:

$value = $mw->Entry(-textvariable => $value)->pack();

Can I even do that with Text()? If not, is there a way to get around it?

Replies are listed 'Best First'.
Re: Perl/Tk Text()
by Mr. Muskrat (Canon) on Jun 05, 2003 at 21:53 UTC

    As far as I can tell, you can't do it like that. It's not a big deal for me because you can do something like this:

    my $text = $mw->Text()->pack(); $text->delete('0.0', 'end'); # delete all $text->insert('0.0', $value); # insert $value