Leser: 2
4 Einträge, 1 Seite |
1
2
3
4
5
6
my $canvas = $top->Canvas(
-width => '750',
-height => '750',
-bg => 'white',
)->pack();
my $e = $canvas->createRectangle(10,10,20,20, -fill => 'red', -outline => 'white' );
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
my $e = $canvas->createRectangel(
10, 10,
20, 20,
-fill => 'red',
-outline => 'white',
-tags => ['rotes rechteck'],
);
$canvas->bind(
'rotes rechteck',
'<B3>',
[
sub {
my $menu = 'erstelle Tk::Menu mit zusätzlichen Infos';
$menu->post( $_[0], $_[1] );
},
Tk::Ev('X'),
Tk::Ev('Y'),
],
);
Dubu+2008-07-27 01:19:15--Suchst du vielleicht etwas wie Tk::Balloon?
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
# -- bloat the baloon
my %gui = (); #... wird irgendwo gefüllt
$gui{baloon} = $top->Balloon(-initwait => 0);
my %msgs = ();
for my $key ( keys %gui ) {
if( $key =~ m/^((?:section|shelf)\d+)$/ ) {
$msgs{$1.'_tag'} = $1;
}
}
$gui{baloon}->attach($canvas,
-balloonposition => 'mouse',
-msg => \%msgs,
);
4 Einträge, 1 Seite |