-
- wxSize sz( m_splitter->GetSize() );
-// wxLogMessage( "Initial splitter size: %d %d\n", (int)sz.x, (int)sz.y );
-
- m_leftCanvas = new MyCanvas(m_splitter, CANVAS1, wxPoint(0, 0), wxSize(400, 400), "Test1" );
- m_leftCanvas->SetBackgroundColour(*wxRED);
- m_leftCanvas->SetScrollbars(20, 20, 50, 50);
- m_leftCanvas->SetCursor(wxCursor(wxCURSOR_MAGNIFIER));
-
- m_rightCanvas = new MyCanvas(m_splitter, CANVAS2, wxPoint(0, 0), wxSize(400, 400), "Test2" );
- m_rightCanvas->SetBackgroundColour(*wxCYAN);
- m_rightCanvas->SetScrollbars(20, 20, 50, 50);
-// m_rightCanvas->Show(FALSE);
-
- m_splitter->SplitVertically(m_leftCanvas,m_rightCanvas, 40 );
-// m_splitter->Initialize(m_leftCanvas);
+
+#if 1
+ m_left = new MyCanvas(m_splitter, CANVAS1, wxPoint(0, 0), wxSize(400, 400), "Test1" );
+ m_left->SetBackgroundColour(*wxRED);
+ m_left->SetScrollbars(20, 20, 50, 50);
+ m_left->SetCursor(wxCursor(wxCURSOR_MAGNIFIER));
+
+ m_right = new MyCanvas(m_splitter, CANVAS2, wxPoint(0, 0), wxSize(400, 400), "Test2" );
+ m_right->SetBackgroundColour(*wxCYAN);
+ m_right->SetScrollbars(20, 20, 50, 50);
+#else // for testing kbd navigation inside the splitter
+ m_left = new wxTextCtrl(m_splitter, -1, "first text");
+ m_right = new wxTextCtrl(m_splitter, -1, "second text");
+#endif
+
+ // you can also do this to start with a single window
+#if 0
+ m_right->Show(FALSE);
+ m_splitter->Initialize(m_left);
+#else
+ m_splitter->SplitVertically(m_left, m_right, 100);
+#endif
+