Igor Anufriyenko wrote:
-driveonly=>1 option allows directories and individual files to picked and returned from Win32::GUI::BrowseForFolder package calls. Is there a way to limit displayed nodes to drives only? It is possible to trim return value using built-in functions, however it would be better(for my project) to keep drive contents hidden from users, i.e. - no "expand" *+* control available for the displayed drives.

Not that I am aware of. I've not played with BrowseForFolder() before, and the -driveonly option didn't do what I was expecting (at least here on my Win98 box) the closest I got was:

#!perl -w
use strict;
use warnings;
use Win32::GUI();

sub CSIDL_DRIVES() {17}

my $folder = Win32::GUI::BrowseForFolder(
        -title      => "Select a drive",
        -folderonly => 1,
        -root       => CSIDL_DRIVES,
);

print "Selected: $folder\n" if defined $folder;

exit(0);
__END__

Regards,
Rob.

Reply via email to