From 75cbbafdeb0e43751cc1e2a23a0b29462d3cbcaa Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Thu, 15 Mar 2007 20:32:36 +0000 Subject: [PATCH 1/1] don't add wxVSCROLL if only wxHSCROLL is explicitly specified (and vice versa), only add (both) if no scrolling styles are specified at all git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@44837 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/generic/scrlwing.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/generic/scrlwing.cpp b/src/generic/scrlwing.cpp index 717187207d..d46d0a017c 100644 --- a/src/generic/scrlwing.cpp +++ b/src/generic/scrlwing.cpp @@ -1392,7 +1392,13 @@ bool wxScrolledWindow::Create(wxWindow *parent, MacSetClipChildren( true ) ; #endif - bool ok = wxPanel::Create(parent, id, pos, size, style|wxHSCROLL|wxVSCROLL, name); + // by default, we're scrollable in both directions (but if one of the + // styles is specified explicitly, we shouldn't add the other one + // automatically) + if ( !(style & (wxHSCROLL | wxVSCROLL)) ) + style |= wxHSCROLL | wxVSCROLL; + + bool ok = wxPanel::Create(parent, id, pos, size, style, name); return ok; } -- 2.45.2