File: TableMatrixSpreadsheetTest

package info (click to toggle)
libtk-tablematrix-perl 1.29-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 2,344 kB
  • sloc: ansic: 22,028; perl: 2,751; makefile: 2,132; sh: 16
file content (41 lines) | stat: -rw-r--r-- 919 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41


use Tk;

use Tk::TableMatrix::Spreadsheet;

use Data::Dumper qw( DumperX);
my $top = MainWindow->new;

my $arrayVar = {};

foreach my $row  (0..20){
	foreach my $col (0..10){
		$arrayVar->{"$row,$col"} = "r$row, c$col";
	}
}

print "Got Here \n";

my $t = $top->Scrolled('Spreadsheet', -rows => 21, -cols => 11, 
                              -width => 6, -height => 6,
			      -titlerows => 1, -titlecols => 1,
			      -variable => $arrayVar,
			      -selectmode => 'extended',
			      -titlerows => 1,
			      -titlecols => 1,
			     #  -state => 'disabled'
			    #  -colseparator => "\t",
			    #  -rowseparator => "\n"
                    );
		    
#$t->tagConfigure('active', -bg => 'gray90', -relief => 'sunken');
#$t->tagConfigure( 'title', -bg => 'gray85', -fg => 'black', -relief => 'sunken');

# $t->bind("<Any-Enter>", sub { $t->focus });



$t->pack(-expand => 1, -fill => 'both');

Tk::MainLoop;