From 2119b213e378d69b8d13f4c8f6012b3aa381efe9 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Thu, 4 Oct 2012 23:24:28 +0000 Subject: [PATCH] Add support for wxALWAYS_SHOW_SB style to wxScrolled<>. Simply call ShowScrollbars(wxSHOW_SB_ALWAYS) if this style is specified. Closes #13616. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72621 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- docs/changes.txt | 1 + include/wx/scrolwin.h | 3 +++ interface/wx/scrolwin.h | 3 +++ 3 files changed, 7 insertions(+) diff --git a/docs/changes.txt b/docs/changes.txt index c2240e528d..59fb3b6d12 100644 --- a/docs/changes.txt +++ b/docs/changes.txt @@ -563,6 +563,7 @@ All (GUI): - Add wxStyledTextCtrl::AnnotationClearLine() (sentieshar). - Add support for background-color style to span element in wxHTML (gevorg). - Add "inherit" to XRC tag (Steffen Olszewski, Gero Meßsysteme GmbH). +- Add support for wxALWAYS_SHOW_SB style to wxScrolled<> (Catalin Raceanu). wxGTK: diff --git a/include/wx/scrolwin.h b/include/wx/scrolwin.h index 6360fd721b..53883f2ae2 100644 --- a/include/wx/scrolwin.h +++ b/include/wx/scrolwin.h @@ -384,6 +384,9 @@ public: if ( !(style & (wxHSCROLL | wxVSCROLL)) ) style |= wxHSCROLL | wxVSCROLL; + if ( style & wxALWAYS_SHOW_SB ) + ShowScrollbars(wxSHOW_SB_ALWAYS, wxSHOW_SB_ALWAYS); + return T::Create(parent, winid, pos, size, style, name); } diff --git a/interface/wx/scrolwin.h b/interface/wx/scrolwin.h index 3d3f8f4717..f7c3568b58 100644 --- a/interface/wx/scrolwin.h +++ b/interface/wx/scrolwin.h @@ -109,6 +109,9 @@ enum wxScrollbarVisibility scrollable only in vertical direction (by default, i.e. if neither this style nor ::wxHSCROLL is specified, it scrolls in both directions). + @style{wxALWAYS_SHOW_SB} + Since wxWidgets 2.9.5, specifying this style makes the window always + show its scrollbars, even if they are not used. See ShowScrollbars(). @style{wxRETAINED} Uses a backing pixmap to speed refreshes. Motif only. @endStyleTable -- 2.47.2