+ // decrease the total size by the size of the non-scrollable parts above/to
+ // the left of the canvas
+ wxSize sizeCanvas(size);
+ sizeCanvas.x -= 60;
+ sizeCanvas.y -= 25;
+ return sizeCanvas;
+}
+
+void MyScrolledWindow::OnSize( wxSizeEvent &WXUNUSED(event) )
+{
+ // We need to override OnSize so that our scrolled
+ // window a) does call Layout() to use sizers for
+ // positioning the controls but b) does not query
+ // the sizer for their size and use that for setting
+ // the scrollable area as set that ourselves by
+ // calling SetScrollbar() further down.
+
+ Layout();
+
+ AdjustScrollbars();