Hey there. I'm having a problem with wxPerl on a Windows platform (though this isn't immediately relevant). Basically, I have a Wx::Panel within a Wx::Frame and it's rendering all the contained widgets just fine but one of the widgets I've used for this project is a Wx::Perl::DirTree (a directory tree module). When implemented, it produces this window:

As you can see, the DirTree is crammed up into the upper-left corner when I want it to be spaced from the edges of the frame by about 50px. Can anybody tell me how I might accomplish such a thing?
Here is the code:
CODE
use warnings;
use Spreadsheet::WriteExcel;
use HTML::TagReader;
use Wx;
# Main application frame subclass.
package XMLLoaderFrame;
use base 'Wx::Frame';
use Wx::Event qw(EVT_BUTTON);
use Wx::Perl::DirTree;
use Wx qw(wxVERTICAL wxTOP);
sub new{
my $ref = shift;
my $self = $ref->SUPER::new(undef, -1, 'XML to XLS Parser', [-1, -1], [600, 500]);
my $panel = Wx::Panel->new($self, -1);
my $run = Wx::Button->new($panel, -1, 'Parse XML', [470, 420], [-1, -1]);
my $dirtree = Wx::Perl::DirTree->new($panel, [200, 300]);
my $mainsizer = Wx::BoxSizer->new(wxVERTICAL);
$mainsizer->Add($dirtree->GetTree(), 0, wxTOP, 0);
# How to handle button pressed event
EVT_BUTTON($self, $run, \&OnClick);
return $self;
}
sub OnClick{
my($self, $event, $btn) = @_;
}
# Core application class
package XMLLoader;
use base 'Wx::App';
sub OnInit{
# When initialized, construct new frame and display it.
my $frame = XMLLoaderFrame->new;
$frame->Show(1);
}
# Main application class. Contains event listening and drawing loop.
package main;
my $instance = XMLLoader->new;
$instance->MainLoop;
This post has been edited by Tracekill: 24 Jun, 2009 - 12:40 PM