From: soapy <ad...@so...> - 2001-11-30 20:40:01
|
hey fellows, how's everybody doing tonight ? i try to put some labels above a TextCtrl in a SplitterWindow... i think this way is the best: - put a Wx::Window in the SplitterWindow - create a sizer with a Label and a TextCtrl - assign the sizer to the Wx::Window and SetAutoLayout for the Wx::Window but it refuses to work... i have no idea why... any hints/tipps or better ways to solve my problem? i would really appreciate it... greetings marco nearly forgot, my code (MyFrame part, abstracted to the problem): sub new { my($class) = shift; my $this = $main::frame = $class->SUPER::new($_[0], -1, @_[1,2,3]); my $splitter = Wx::SplitterWindow->new($this, -1, wxDefaultPosition, wxDefaultSize); my $window = Wx::Window->new($splitter, -1, wxDefaultPosition, wxDefaultSize); my $sizer = Wx::BoxSizer->new(wxVERTICAL); $this->{tree} = Wx::TreeCtrl->new($splitter, -1); $this->{label} = Wx::StaticText->new($window, -1, 'not working testlabel'); $this->{text} = Wx::TextCtrl->new($window, -1, '', wxDefaultPosition, wxDefaultSize, wxTE_MULTILINE); $sizer->Add($this->{label}, 0, wxEXPAND); $sizer->Add($this->{text}, 1, wxEXPAND); $window->SetSizer($sizer); $window->SetAutoLayout(1); $window->SetBackgroundColour(wxGREEN); $splitter->SplitVertically($this->{tree}, $window); return $this; } |