From 3f393e3dbdfb73b7d0500b5c67c6c38dedd0e82e Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Tue, 27 Nov 2001 14:45:58 +0000 Subject: [PATCH] don't show scrollbars at all when the window is big enough git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@12727 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/univ/winuniv.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/univ/winuniv.cpp b/src/univ/winuniv.cpp index 4ce63facfe..a7430cb2e4 100644 --- a/src/univ/winuniv.cpp +++ b/src/univ/winuniv.cpp @@ -659,9 +659,12 @@ void wxWindow::SetScrollbar(int orient, int range, bool refresh) { + wxASSERT_MSG( pageSize <= range, + _T("page size can't be greater than range") ); + bool hasClientSizeChanged = FALSE; wxScrollBar *scrollbar = GetScrollbar(orient); - if ( range ) + if ( range && (pageSize < range) ) { if ( !scrollbar ) { -- 2.45.2