
Wx::Perl::DirTree - A directory tree widget for wxPerl

Many widgets that display directory trees are dialogs or can't handle drives on Windows. This module aims to fill the gap. It can be integrated in any frame or dialog and it handles drives under Windows.

use Wx::Perl::DirTree;
my $panel = Wx::Panel->new;
my $tree = Wx::Perl::DirTree->new( $panel, [100,100] );
my $main_sizer = Wx::BoxSizer->new( wxVERTICAL );
$main_sizer->Add( $tree->GetTree, 0, wxTOP, 0 );
# in a subroutine
print $tree->GetSelectedPath;

$tree->GetSelectedPath
This method returns the path of the item that is selected.
$tree->GetTree
This is just a convenience method that wraps the GetTree method of Wx::Perl::VirtualTree.
Creates a new object
my $tree = Wx::Perl::DirTree->new( $panel, [100,100] );
my $tree2 = Wx::Perl::DirTree->new(
$panel,
[100,100],
{
dir => $path_to_dir,
}
);
my $tree2 = Wx::Perl::DirTree->new(
$panel,
[100,100],
{
dir => $path_to_dir,
is_root => 1,
}
);
Parameters:
A parent widget.
The size of the tree widget. This has to be an array reference.
In this hash reference you can specifiy more parameters:
If you want to "open" a specific directory, you can specify "dir"
If set to a true value, the dir tree starts at the specified directory. If you want to provide a directory tree that shows only the directories below the home directory of a user you can do this:
Wx::Perl::DirTree->new(
$panel,
$size,
{
dir => File::HomeDir->my_home,
is_root => 1,
}
);
See also the scripts in the example dir.

Renee Baecker, <module at renee-baecker.de>

Please report any bugs or feature requests to bug-wx-perl-dirtree at rt.cpan.org, or through the web interface at http://rt.cpan.org/NoAuth/ReportBug.html?Queue=Wx::Perl::DirTree. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes.

You can find documentation for this module with the perldoc command.
perldoc Wx::Perl::DirTree
You can also look for information at:


Copyright 2008 Renee Baecker, all rights reserved.
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.