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)
@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.
&dir_populator
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.
Wx::Perl::VirtualTreeCtrl::GetPath
Set a custom Wx::ImageList for the tree control
If FALSE, the OK button will be greyed-out when the root item is selected.
OK
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.
$which
The standard tree control from which this object is derived.
A tree control that is populated dynamically.
http://www.wxwidgets.org
http://wxperl.sourceforge.net
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
To install Wx::Perl::VirtualTreeCtrl, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Wx::Perl::VirtualTreeCtrl
CPAN shell
perl -MCPAN -e shell install Wx::Perl::VirtualTreeCtrl
For more information on module installation, please visit the detailed CPAN module installation guide.