in reply to Re: win32-FileOp module for strawberry
in thread win32-FileOp module for strawberry
Hi Marto
Thanks for your response. Below i have pasted my sample code.
use Tk; use Win32::FileOp; my $mw = MainWindow -> new; my $frmWidth = 452; my $frmHeigt = 50; my $screenypos = $mw->screenheight(); my $screenxpos = $mw->screenwidth(); $screenxpos = $screenxpos - $frmWidth; + + $screenxpos = $screenxpos/2; $screenypos = $screenypos - $frmHeigt; $screenypos = $screenypos/2; $mw->geometry("${frmWidth}x$frmHeigt+$screenxpos+$screenypos"); $mw->resizable('no', 'no'); $mw->title ("Test"); my $mainFrame = $mw -> Frame -> pack (-side => 'top', -padx => '8', -p +ady => '10'); $BrowseFrame = $mainFrame -> Frame() -> pack (-side => 'top', -pady => + '5'); $BrowseFrame -> Button (-text => 'Select folder', -command => \&gotoFi +le, -background => '#ccccff', -activebackground => '#6666ff') -> pack + (-side => 'left', -padx => '5'); $BrowseFrame -> Entry (-textvariable => \$filepath, -width => '84', -b +ackground => '#ccccff') -> pack (-side => 'left', -padx => '2'); $mw->update; MainLoop; sub gotoFile { $filepath = BrowseForFolder ("Choose Directory", CSIDL_DRIVES, BIF +_RETURNONLYFSDIRS); $mw->Unbusy; return 'Cancel' unless($filepath); return; }
Thanks
Srikrishnan
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: win32-FileOp module for strawberry
by Anonymous Monk on Nov 04, 2022 at 21:28 UTC | |
|
Re^3: win32-FileOp module for strawberry
by Marshall (Canon) on Nov 04, 2022 at 17:08 UTC | |
by kcott (Archbishop) on Nov 05, 2022 at 02:43 UTC |