Coloreado en 0.000 segundos, usando GeSHi 1.0.8.4
Using perl Syntax Highlighting
- use Tk::Table;
- use Tk;
- my $mw = MainWindow->new;
- $mw->geometry("475x125");
- $mw->resizable(0,0);
- $mw->title("Table Example");
- my $table_frame = $mw->Frame()->pack();
- my $table = $table_frame->Table(-columns => 8,
- -rows => 4,
- -fixedrows => 1,
- -scrollbars => 'oe',
- -relief => 'raised');
- foreach my $col (1 .. 8)
- {
- my $tmp_label = $table->Label(-text => "COL " . $col, -width => 8, -relief =>'raised');
- $table->put(0, $col, $tmp_label);
- }
- foreach my $row (1 .. 8)
- {
- foreach my $col (1 .. 8)
- {
- my $tmp_label = $table->Label(-text => $row . "," . $col,
- -padx => 2,
- -anchor => 'w',
- -background => 'white',
- -relief => "groove");
- $table->put($row, $col, $tmp_label);
- }
- }
- $table->pack();
- MainLoop;
Coloreado en 0.003 segundos, usando GeSHi 1.0.8.4
¿ Alguien sabe cómo hacerlo ?