Leser: 2
|< 1 2 >| | 13 Einträge, 2 Seiten |
1
2
3
4
5
6
7
$mw->bind( "Tk::Text", '<Alt-o>' => sub{ _openHandle( $HRI ); } );
$mw->bind( "Tk::Text", '<Alt-c>' => sub{ closeHandle( $HRI ); } );
$mw->bind( "Tk::Text", '<Alt-r>' => sub{
if( $HRI->{'Data'}{'COM'}{'echo'} ) {
$HRI->{'Data'}{'COM'}{'echo'} = 0;
}
else{ $HRI->{'Data'}{'COM'}{'echo'} = 1; } });
1
2
3
4
5
6
7
8
9
use strict;
use warnings;
use Tk;
my $mw = MainWindow -> new();
my $text = $mw -> Text() -> pack();
$mw -> bind("Tk::Text", "<Alt-Key-o>" => sub { print "funktioniert" } );
MainLoop;
$text->bind('<Alt-Key-o>' => sub { print "funktioniert o\n" });
QuoteTk::bind
...
DESCRIPTION
The bind method associates callbacks with X events. If 'callback' is
specified, bind will arrange for 'callback' to be evaluated whenever the
event(s) given by 'sequence' occur in the window(s) identified by
'$widget' or 'tag'.
...
... => sub { $button->invoke() }
$mw->bind('<Alt-Key-o>',\&funktion);
$mw -> bind("<Alt-Key-o>" => sub { #mach was });
1
2
3
4
5
6
7
8
9
10
11
12
#!/usr/bin/perl
use strict;
use warnings;
use Tk;
my $mw = MainWindow -> new();
my $text = $mw -> Text() -> pack();
$mw -> bind( "<Alt-Key-o>" => sub { print "funktioniert\n" } );
MainLoop;
|< 1 2 >| | 13 Einträge, 2 Seiten |