X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/b9dac1ab881565b394759b3a7373228a1014e0d4..9859d369b49e35a1cad0f760173e165f974fb6cb:/src/generic/scrlwing.cpp 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; }