6 Einträge, 1 Seite |
QuoteTk::Error: Can't call method "Popup" on an undefined value at C:\Perl\Scripten\Sudoku\main1.pl line 49.
<Button-3>
(command bound to event)
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
my @felder = ();
my @menus = ();
# z = zeile; s = spalte
for( my $z = 0; $z <= 8; $z++ ){
for( my $s = 0; $s <= 8; $s++ ){
# Was soll gerae angezeigt werden?
my $inhalt = "$z.$s";
#my $inhalt = int( rand(8) + 1 );
# Es wird in einem Label angezeigt
$felder[$z][$s] = $mw->Label(-text => $inhalt,);
# Dingens in Tabelle einfügen
$t->put($z, $s, $felder[$z][$s]);
# Menu für Feld erzeugen
$menus[$z][$s] = $felder[$z][$s]->Menu(
-menuitems => [
[Separator => ""],
],
);
#die Dumper($menus[$z][$s]);
$felder[$z][$s]->bind(
"<Button-3>" => sub {
$menus[$z][$s]->Popup(
-popover => "cursor",
-popanchor => 'nw'
);
}
);
}
}
1
2
3
4
5
6
7
8
9
10
11
# Menu für Feld erzeugen
$menus[0][0] = $felder[0][0]->Menu(-menuitems => [[Separator => ''],]);
#die Dumper($menus[0][0]);
$felder[0][0]->bind(
"<Button-3>" => sub {
$menus[0][0]->Popup(
-popover => "cursor",
-popanchor => 'nw'
);
}
);
6 Einträge, 1 Seite |