sub create_table { $arrayVar = {}; ($rows,$cols) = (5000, 6); foreach my $row (0..($rows-1)){ $arrayVar->{"$row,0"} = "$row"; } foreach my $col (0..($cols-1)){ $arrayVar->{"0,$col"} = "$col"; } #Creating Table... sub colSub{ my $col = shift; return "OddCol" if( $col > 0 && $col%2) ; } $t = $frame_d->Scrolled('TableMatrix', -state=>'disabled', -rows => $rows, -cols => $cols, -width => 6, -bg=>'white', -height => 12, -titlerows => 1, -titlecols => 1, -variable => $arrayVar, -coltagcommand => \&colSub, -browsecommand => \&brscmd, -colstretchmode => 'last', -flashmode => 1, -flashtime => 2, -wrap=>1, -rowstretchmode => 'last', -selectmode => 'extended', -selecttype=>'row', -selecttitles => 0, -drawmode => 'fast', -scrollbars=>'se', -sparsearray=>0, )->pack(-expand => 'both', -fill => 'both'); } #### #clear table sub clear_table{ foreach my $row(1..$rows){ foreach my $col(1..$cols){ $arrayVar->{"$row,$col"} = ""; } } }