in reply to Re: Perl Tk Forgetting a Widget
in thread Perl Tk Forgetting a Widget

I agree re Tk's nasty habits. I don't understand the desire to destroy/recreate or forget/repack. Why not just clear all the text from the widget?

sub clear { $tx->delete('1.0','end'); }

Replies are listed 'Best First'.
Re^3: Perl Tk Forgetting a Widget
by zentara (Cardinal) on Oct 16, 2011 at 13:39 UTC
    Why not just clear all the text from the widget?

    So he could rebuild another page for that Frame, perhaps a Canvas with a chart on it?


    I'm not really a human, but I play one on earth.
    Old Perl Programmer Haiku ................... flash japh

      That would be a good reason. My statement was in reference to the OP's

      I want to be able to forget/destroy/delete the widget when I move to a new option in the menu so I can create a fresh one to output text from the next script the user will run. [emphasis added]

      If the purpose of destroying or forgetting is to clear the widget, using widget->delete is more efficient.