![]() |
|< 1 2 3 >| | ![]() |
22 Einträge, 3 Seiten |
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 $thumb1 = $frame1->Scrolled('Thumbnail',
-scrollbars => 'e',
-iwidth => 200,
-iheight => 300,
-width => 250,
-ilabels => '0',
#zoombtn => 'right',
-cols => '1',
-command => sub {\&StartDrag($dnd_token)},
);
$thumb1->pack( qw/ -fill y -expand 1 / );
$thumb1->update;
$dnd_token = $thumb1->DragDrop
(-event => '<B1-Motion>',
-sitetypes => ['Local'],);
$frame3->DropSite
(-droptypes => ['Local'],
-dropcommand => [ \&Drop, $thumb3, $dnd_token ],
);
sub StartDrag {
my $w = $dnd_token->parent;
my $e = $w->XEvent;
my $pic = $thumb1->Photo(-file=>$_[1]);
}
sub Drop {
$thumb3->configure( -images => [$pic] );
$thumb3->update;
}
my($X, $Y) = ($e->X, $e->Y);
1
2
error:Can't call method "X" on an undefined value at E:\Testprogramme\Clear up
PDF\Clear_up_PDF_ver.0.02.pl line 135.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
my $thumb1 = $frame1->Scrolled('Thumbnail',
-scrollbars => 'e',
-iwidth => 200,
-iheight => 300,
-width => 250,
-ilabels => '0',
#zoombtn => 'right',
-cols => '1',
-command => sub {\&StartDrag($_[0])},
);
sub StartDrag {
my($token) = @_;
my $w = $token->parent;
my $e = $w->XEvent;
my($X, $Y) = ($e->X, $e->Y);
}
1
2
3
4
5
6
sub StartDrag {
my($w) = @_; # falls $_[0] hier das Tk::Thumbnail-Widget ist
my $e = $w->XEvent;
my($X, $Y) = ($e->X, $e->Y);
# und den ganzen Rest mit MoveToplevel etc.
}
$gs_prog = ($^O eq 'MSWin32' ? "gswin32.exe" : "ghostscript");
$gs_prog = ($^O eq 'MSWin32' ? "gswin32.exe" : "ghostscript");
![]() |
|< 1 2 3 >| | ![]() |
22 Einträge, 3 Seiten |