Nested wxSplitterWindows
-Patrick
CaptainMorganRawks at gmail.com
Sat Aug 11 15:07:00 PDT 2007
I've looked over the discussion forums, which when searched for the
keyword wxSplitterWindow showed three pages with entries - most of which
I examined, and the keywords:
nested wxSplitterWindow returned no results. I found this and tried to
understand it:
http://lists.wxwidgets.org/archive/wx-users/msg10281.html
My goal is to replicate the exact opposite - with the horizontal split
on the left hand side instead of the right.
The header file for MyFrame.h looks like this:
class MyFrame : public wxFrame {
private:
/**
* Layout variables for the split and scrolled windows.
*/
wxSplitterWindow *mainSplitter, *nestedSplitter;
wxWindow *leftWindow, *rightWindow, *topLeftWindow, *bottomLeftWindow;
.......
And the implementation is failing horribly with only a top left window
about 10 x 10 pixels in size. I did successfully implement one split
window but I am having trouble implementing a nested split window.
MyFrame.cpp:
void MyFrame::CreateSplitter() {
mainSplitter = new wxSplitterWindow(this);
// settings for left window
leftWindow = new wxScrolledWindow(mainSplitter);
leftWindow->SetBackgroundColour(*wxBLACK);
// settings for the righthand side column
rightWindow = new wxScrolledWindow(mainSplitter);
rightWindow->SetBackgroundColour(*wxWHITE);
nestedSplitter = new wxSplitterWindow(leftWindow);
// settings for the top window
topLeftWindow = new wxScrolledWindow(nestedSplitter);
topLeftWindow->SetBackgroundColour(*wxBLACK);
// settings for the bottom window
bottomLeftWindow = new wxScrolledWindow(nestedSplitter);
bottomLeftWindow->SetBackgroundColour(*wxWHITE);
mainSplitter->SplitVertically(nestedSplitter, rightWindow, 700);
nestedSplitter->SplitHorizontally(topLeftWindow, bottomLeftWindow,
100);
......
I look forward to your suggestions.
Thank you,
-Patrick
More information about the wx-users
mailing list