Debian Codegraph @

demos/TableMatrixSpreadsheetTest

raw
1
2
3 use Tk;
4
5 use Tk::TableMatrix::Spreadsheet;
6
7 use Data::Dumper qw( DumperX);
8 my $top = MainWindow->new;
9
10 my $arrayVar = {};
11
12 foreach my $row (0..20){
13 foreach my $col (0..10){
14 $arrayVar->{"$row,$col"} = "r$row, c$col";
15 }
16 }
17
18 print "Got Here \n";
19
20 my $t = $top->Scrolled('Spreadsheet', -rows => 21, -cols => 11,
21 -width => 6, -height => 6,
22 -titlerows => 1, -titlecols => 1,
23 -variable => $arrayVar,
24 -selectmode => 'extended',
25 -titlerows => 1,
26 -titlecols => 1,
27 # -state => 'disabled'
28 # -colseparator => "\t",
29 # -rowseparator => "\n"
30 );
31
32 #$t->tagConfigure('active', -bg => 'gray90', -relief => 'sunken');
33 #$t->tagConfigure( 'title', -bg => 'gray85', -fg => 'black', -relief => 'sunken');
34
35 # $t->bind("<Any-Enter>", sub { $t->focus });
36
37
38
39 $t->pack(-expand => 1, -fill => 'both');
40
41 Tk::MainLoop;