I'm building a layout for a console app and here's what I want to achieve. What I have so far is this. My main window is deriving from a wxFrame. I split the window using wxSplitterWindow into two windows : the one on the left - a wxTreeCtrl and the one on the right is a wxPanel. My question is how to achieve the following: a horizontal list (perhaps a grid?) that shows like records from a db, but with a scroll, so that only like 20-30 are shown, and a simple textarea below this table(grid?).
I tried to split the wxPanel, just like I did with the Frame, but it doesn't work. When I tried to change the Panel to a Frame it worked, but the Frame is opened in a new window. So now I'm asking what elements to use and how to position them so that I have a scrollable table, a horizontal line, and then a simple textarea. The horizontal line should be in the middle of the left panel. Here's my code for the right panel so far: package RightPanel;
use strict;
use base qw(Wx::Panel);
use Wx qw(:everything);
sub new {
my ($class, $parent_window) = @_;
my ($self) = $class->SUPER::new($parent_window);
return $self;
}
A
wxSplitterWindowis intended for a window that can be split and unsplit at run time. Text editors often have this sort of feature so that they can offer two independent views of the same document.I assume you will always want three independent windows in your frame? You should simply create the three windows separately and do the arithmetic to align them. It sounds like you want a
wxScrolledWindowat the top and awxPanelat the bottom.