Oops, wrong list...
------- Forwarded message follows -------
From: "Mattia Barbon" <mb...@ds...>
To: wx-...@li...
Subject: Re: [wxperl-users] BoxSizer in a SplitterWindow
Priority: normal
Send reply to: wx-...@li...
Date sent: Fri, 30 Nov 2001 23:58:26 +0100
[ Double-click this line for list subscription options ]
> 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
If it must contain controls, it is better to use a Wx::Panel
> - 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...
Because Wx::Window does not do automatic layout of subwindows;
Wx::Panel will allow you to navigate between controls using
<TAB>
> any hints/tipps or better ways to solve my problem?
> i would really appreciate it...
FYI using a Wx::Window you could just add an OnSize handler that
calls ->Layout();
Regards
Mattia
> 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;
> }
>
>
> _______________________________________________
> wxperl-users mailing list
> wxp...@li...
> https://lists.sourceforge.net/lists/listinfo/wxperl-users
>
_______________________________________________
wx-users mailing list
wx-...@li...
http://lists.wxwindows.org/mailman/listinfo/wx-users
------- End of forwarded message -------
|