// default scrolled window style
#ifndef wxScrolledWindowStyle
-#define wxScrolledWindowStyle (wxHSCROLL | wxVSCROLL)
+ #define wxScrolledWindowStyle (wxHSCROLL | wxVSCROLL)
#endif
// avoid triggering this stupid VC++ warning
virtual void PrepareDC(wxDC& dc) { DoPrepareDC(dc); }
- // lay out the window and its children
+ // lay out the window and its children
virtual bool Layout();
- virtual void DoSetVirtualSize( int x, int y );
-
protected:
// this is needed for wxEVT_PAINT processing hack described in
// wxScrollHelperEvtHandler::ProcessEvent()
#endif
// _WX_GENERIC_SCROLLWIN_H_
-// vi:sts=4:sw=4:et
m_targetWindow->SetVirtualSizeHints( noUnitsX * pixelsPerUnitX, noUnitsY * pixelsPerUnitY );
+ AdjustScrollbars();
+
if (do_refresh && !noRefresh)
m_targetWindow->Refresh(TRUE, GetRect());
// Default OnSize resets scrollbars, if any
void wxScrollHelper::HandleOnSize(wxSizeEvent& WXUNUSED(event))
{
- if( m_targetWindow != m_win )
+ if ( m_targetWindow != m_win )
m_targetWindow->SetVirtualSize( m_targetWindow->GetClientSize() );
m_win->SetVirtualSize( m_win->GetClientSize() );
+ AdjustScrollbars();
+
#if wxUSE_CONSTRAINTS
if (m_win->GetAutoLayout())
m_win->Layout();
return wxPanel::Layout();
}
-void wxGenericScrolledWindow::DoSetVirtualSize( int x, int y )
-{
- wxPanel::DoSetVirtualSize( x, y );
- AdjustScrollbars();
-}
-
void wxGenericScrolledWindow::OnPaint(wxPaintEvent& event)
{
// the user code didn't really draw the window if we got here, so set this