]> git.saurik.com Git - wxWidgets.git/blobdiff - docs/latex/wx/tsplittr.tex
Add empty EnableCloseButton() into wxTLW base class.
[wxWidgets.git] / docs / latex / wx / tsplittr.tex
index ac4a35b945d0d4ccc67205ed2bed84cb30350d4e..963f3e392c70b5ede999bd3e436d1dc90f864628 100644 (file)
@@ -2,31 +2,29 @@
 
 Classes: \helpref{wxSplitterWindow}{wxsplitterwindow}
 
-The following screenshot shows the appearance of a splitter window with a vertical split.
+The following screenshot shows the appearance of a splitter window with a horizontal split.
 
 $$\image{8cm;0cm}{splitter.eps}$$
 
 The style wxSP\_3D has been used to show a 3D border and 3D sash.
 
-\subsection{Example}
+\subsection{Example}\label{wxsplitterwindowexample}
 
 The following fragment shows how to create a splitter window, creating two
 subwindows and hiding one of them.
 
 {\small
 \begin{verbatim}
-  splitter = new wxSplitterWindow(this, 0, 0, 400, 400, wxSP_3D);
+  splitter = new wxSplitterWindow(this, -1, wxPoint(0, 0), wxSize(400, 400), wxSP_3D);
 
-  leftCanvas = new MyCanvas(splitter);
-  leftCanvas->SetBackground(wxRED_BRUSH);
-  leftCanvas->SetScrollbars(20, 20, 50, 50, 4, 4);
+  leftWindow = new MyWindow(splitter);
+  leftWindow->SetScrollbars(20, 20, 50, 50);
 
-  rightCanvas = new MyCanvas(splitter);
-  rightCanvas->SetBackground(wxCYAN_BRUSH);
-  rightCanvas->SetScrollbars(20, 20, 50, 50, 4, 4);
-  rightCanvas->Show(FALSE);
+  rightWindow = new MyWindow(splitter);
+  rightWindow->SetScrollbars(20, 20, 50, 50);
+  rightWindow->Show(false);
 
-  splitter->Initialize(leftCanvas);
+  splitter->Initialize(leftWindow);
 
   // Set this to prevent unsplitting
 //    splitter->SetMinimumPaneSize(20);
@@ -41,18 +39,18 @@ The next fragment shows how the splitter window can be manipulated after creatio
   {
         if ( splitter->IsSplit() )
             splitter->Unsplit();
-        leftCanvas->Show(TRUE);
-        rightCanvas->Show(TRUE);
-        splitter->SplitVertically( leftCanvas, rightCanvas );
+        leftWindow->Show(true);
+        rightWindow->Show(true);
+        splitter->SplitVertically( leftWindow, rightWindow );
   }
 
   void MyFrame::OnSplitHorizontal(wxCommandEvent& event)
   {
         if ( splitter->IsSplit() )
             splitter->Unsplit();
-        leftCanvas->Show(TRUE);
-        rightCanvas->Show(TRUE);
-        splitter->SplitHorizontally( leftCanvas, rightCanvas );
+        leftWindow->Show(true);
+        rightWindow->Show(true);
+        splitter->SplitHorizontally( leftWindow, rightWindow );
   }
 
   void MyFrame::OnUnsplit(wxCommandEvent& event)