David S has asked for the wisdom of the Perl Monks concerning the following question:
use strict; use Tk; use Tk::Pane; my $textVariable = "my text"; my $mw = MainWindow->new; my $frame = $mw->Frame()->pack(-side => 'top', -expand => 1, -fill => +'x'); $frame->Label(-text => "My Label", -anchor => 'w', -width => 10)->pack(-ipady => 1, -side => 'left'); my $entry = $frame->Entry(-textvariable => \$textVariable, -width => 40)->pack(-side => 'left'); $frame->DropSite(-dropcommand => [\&AcceptDrop, $frame], -droptypes => ('Win32')); MainLoop; sub AcceptDrop { my ($widget, $selection) = @_; my $filename; $filename = $widget->SelectionGet(-selection => $selection, 'STRIN +G'); $textVariable = $filename; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Drag and Drop in Tkx
by Anonymous Monk on Jan 25, 2010 at 16:34 UTC | |
by David S (Sexton) on Jan 25, 2010 at 16:58 UTC | |
by Anonymous Monk on Jan 25, 2010 at 17:54 UTC | |
by David S (Sexton) on Jan 25, 2010 at 18:32 UTC | |
|
Re: Drag and Drop in Tkx
by zentara (Cardinal) on Jan 26, 2010 at 11:43 UTC | |
by David S (Sexton) on Jan 26, 2010 at 11:59 UTC | |
by David S (Sexton) on Feb 12, 2010 at 17:37 UTC | |
by Anonymous Monk on May 05, 2010 at 21:16 UTC | |
by Anonymous Monk on Feb 13, 2010 at 04:04 UTC | |
by Anonymous Monk on Feb 13, 2010 at 06:51 UTC | |
|