From: Marco T. <wx...@so...> - 2002-03-18 17:21:41
|
> In the code below, when I've created a tree, I've specified $lcanvas, a > reference to the left hand canvas, as the parent. If I change this to > $self (the window or frame?), the window isn't split properly and only a > small rectangular region is displayed. So, my main questions are: > - How can I add a tree to the left-hand part/canvas of the window? my $splitter = Wx::SplitterWindow->new($this, -1); my $tree = Wx::TreeCtrl->new($splitter, -1); my $something = Wx:Something->new($splitter, -1); $splitter->SplitVertically($tree, $something); > - How can I generally add controls to frames? i was at the same point like you are now two or three months ago... i suggest to read and rewrite the examples depending on your wishes... they have everythin you need... as soon as you understand them, you'll be able to use the wxwindows docs to programm your stuff > - How can I create multiple frames for my application? How can I load and unload them? check the samples (splitter.pl)... my way to create multiple frames: my $splitter1 = Wx::SplitterWindow->new($this, -1); my $splitter2 = Wx::SplitterWindow->new($this, -1); my $tree = Wx::TreeCtrl->new($splitter1, -1); my $something1 = Wx:Something->new($splitter2, -1); my $something2 = Wx:Something->new($splitter2, -1); $splitter1->SplitVertically($tree, $splitter2); $splitter2->SplitVertically($somethin1, $something2); > I'm also having problems with toolbars Wx::Image::AddHandler(new Wx::PNGHandler); my $toolbar = $this->CreateToolBar(wxTB_HORIZONTAL|wxNO_BORDER|wxTB_FLAT, -1); $toolbar->SetToolBitmapSize(wxSIZE(22,22)); $toolbar->AddTool(0, Wx::Bitmap->new('icons/download.png', wxBITMAP_TYPE_PNG), 'download emails'); $toolbar->AddSeparator; $toolbar->AddTool(1, Wx::Bitmap->new('icons/new.png', wxBITMAP_TYPE_PNG), 'new email'); $toolbar->Realize(); a little part of my email program written with wxPerl... you could run in problems if you haven't all of "wxTB_HORIZONTAL|wxNO_BORDER|wxTB_FLAT" hope it helps greeting Marco |