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

Does anyone know how i clear data from a txt scrollbox.

code is

$mainmenu = new MainWindow;
my $mbar = $mainmenu -> Menu();
$mainmenu -> configure(-menu => $mbar);
#Making a text area
my $txt = $mainmenu -> Scrolled('Text',-width => 50,-
scrollbars=>'e') -> pack ();


So when i want to clear all of the txt in that box that
other routines might have put in there is there something like
$txt->clearbox;

Replies are listed 'Best First'.
Re: Perl TK clearing data from Txt box
by zentara (Cardinal) on Aug 18, 2005 at 13:50 UTC
    $txt->delete('1.0', 'end');

    Just to give you a little "head's up", the notation in a textbox is "linenumber.position_in_line". So 1.0 means line number 1, first letter. There are some common shortcut's like 'end' always means end of all text.


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