
Wx::Perl::VirtualDirSelector - A "virtual" clone of the standard DirSelector

Wx::Dialog

use Wx::Perl::VirtualDirSelector;
my $dirsel = new Wx::Perl::VirtualDirSelector(
undef, -1, \&OnDirPopulate, 'Select a folder', 'c:\\'
);
$dirsel->SetRootLabel('/');
$dirsel->ExpandRoot();
if ($dirsel->ShowModal() == wxID_OK) {
Wx::MessageBox(sprintf "you selected '%s'", $dirsel->GetSelection);
}
A clone of the standard windows DirSelector (wxDirSelector()), driven by a Wx::Perl::VirtualTreeCtrl.
Returns a virtual dir selector (@ISA Wx::Dialog)
$parent - parent window (default: TopWindow)
$id - window id
\&dir_populator - coderef to populate virtual tree control
$message - Selection prompt (default: 'Select a directory')
$root_data - Data assigned to the root item (default: '')
$style - dialog style (default: wxDEFAULT_DIALOG_STYLE)
$pos - dialog position (default: wxDefaultPosition)
&dir_populator is a Wx::Perl::VirtualTreeCtrl event callback.
Expand the root Item
Returns the data for the selected tree item.
Returns a list of path elements from the root node to the selected node.
See the documentation for Wx::Perl::VirtualTreeCtrl::GetPath for more information.
Set a custom Wx::ImageList for the tree control
If FALSE, the OK button will be greyed-out when the root item is selected.
Default: TRUE
Set the root item's text label
Set the root item's image. See Wx::TreeCtrl::GetItemImage for an explanation of the optional $which parameter.
The standard tree control from which this object is derived.
A tree control that is populated dynamically.
Simon Flack <cpan _at_ bbc _dot_ co _dot_ uk>

(c) BBC 2005. This program is free software; you can redistribute it and/or modify it under the GNU GPL.
See the file COPYING in this distribution, or http://www.gnu.org/licenses/gpl.txt