in reply to Open Directory using Win32:GUI?

Righto... I found some stuff, but not exactly what I was after
From the Documentation...
BrowseForFolder( OPTIONS ) Displays the standard ``Browse For Folder'' dialog box. Returns the selected item's name, or undef if no item was selected or an error occurred. Note that BrowseForFolder must be called as a standalone function, not as a method. Example:
$folder = Win32::GUI::BrowseForFolder( -root => "C:\\Program Files", -includefiles => 1, );
other options are... -computeronly, -domainonly, -driveonly, -editbox, -folderonly, -includefiles, -owner, -printeronly, -root, -title
What I was actually thinking of was
$ret = GUI::GetSaveFileName( -title => "Save your newly generated Mail Merge Document.", -file => "\0" . " " x 256, -filter => [ "Word documents (*.doc)" => "*.doc", "All files", "*.*", ],
With another option in there, but I can't find it anywhere. Oh well, I am sure that browse for folder will work. Let me know how you get on.
Regards, Gerard.

Replies are listed 'Best First'.
Re: Re: Open Directory using Win32:GUI?
by $code or die (Deacon) on Jan 10, 2002 at 15:11 UTC

    That's strange, last time I wanted to do this I had to use Win32::FileOp from Jan Krynicky. Maybe it was added to Win32::GUI in a recent version or I just overlooked the docs before.

    It's not bad though, Win32::FileOp has some other nice functions for deleting\recyclying files etc. Worth a look.

    update: Oh, you can use Win32::FileOp::BrowseForFolder() in a console script and avoid the overhead of loading Win32::GUI.

    Simon Flack ($code or die)
    $,=reverse'"ro_';s,$,\$,;s,$,lc ref sub{},e;$,
    =~y'_"' ';eval"die";print $_,lc substr$@,0,3;
Thanks, Gerard!
by mr_dont (Beadle) on Jan 11, 2002 at 04:52 UTC

    YES, Win32::GUI::BrowseForFolder is perfect! That is the widget I am looking for...

    Thank you Gerard! It was really nice of you to help me out with this widget. I often find when I am learning a new set of GUI widgets/methods, I know that a certain call to a widget exists (because I've seen the widget!), but I have trouble finding the actual name of the method...

    I owe you one!

    Mr. Don't