in reply to removing rows from a Tk::Table

Sometimes when RTFM-ing is not enough, you need to UTSA(Use The Source Luke), and this is quite often the case with perkTk.

from site/lib/Tk/Table.pm:

sub clear { my $self = shift; my $rows = $self->cget(-rows); my $cols = $self->cget(-columns); foreach my $r (1 .. $rows) { foreach my $c (1 .. $cols) { my $old = $self->get( $r, $c ); next unless $old; $self->LostSlave($old); $old->destroy; } } $self->_init; $self->QueueLayout(_SlaveSize); }
I hope that clears up what you need to do.

MJD says "you can't just make shit up and expect the computer to know what you mean, retardo!"
I run a Win32 PPM repository for perl 5.6.x and 5.8.x -- I take requests (README).
** The third rule of perl club is a statement of fact: pod is sexy.

Replies are listed 'Best First'.
Re^2: removing rows from a Tk::Table
by qumsieh (Scribe) on Sep 12, 2004 at 14:58 UTC
    My copy of the Tk::Table docs contain this:

    The table can be emptied using $table->clear the widgets which were in the table are destroyed.
    :)

    For the OP, you can also use a Listbox or an HList.

Re^2: removing rows from a Tk::Table
by Courage (Parson) on Sep 12, 2004 at 15:47 UTC
    Why not using abbreviation "RTFS", which means "Read This Fine Source"?
    IMHO it is a bit clearer than UTSA...