Thread Tk::Thumbnail in Verbindung mit Drag and Drop: Bitte bitte helft mir weiter... (21 answers)
Opened by zipster at 2005-06-28 13:01

zipster
 2005-06-29 18:15
#44093 #44093
User since
2004-09-06
458 Artikel
BenutzerIn
[default_avatar]
MMmmmmhhh, ich habs mal versucht.

Aber richtig funktionieren tuts nicht. :(
Und ich habe verschiedene Variationen versucht. mist....
Code: (dl )
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;
}
\n\n

<!--EDIT|zipster|1120054579-->

View full thread Tk::Thumbnail in Verbindung mit Drag and Drop: Bitte bitte helft mir weiter...