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