From d228892871b1831f8b9750ee0359ae69caaf7afb Mon Sep 17 00:00:00 2001 From: Robert Roebling Date: Mon, 23 Oct 2006 18:55:28 +0000 Subject: [PATCH] [ 1582733 ] Support wxALWAYS_SHOW_SB in wxGTK git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@42291 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/gtk/window.cpp | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/src/gtk/window.cpp b/src/gtk/window.cpp index 206fe6ffd8..d986f1f4a6 100644 --- a/src/gtk/window.cpp +++ b/src/gtk/window.cpp @@ -2319,7 +2319,17 @@ bool wxWindowGTK::Create( wxWindow *parent, GtkScrolledWindowClass *scroll_class = GTK_SCROLLED_WINDOW_CLASS( GTK_OBJECT_GET_CLASS(m_widget) ); scroll_class->scrollbar_spacing = 0; - gtk_scrolled_window_set_policy( scrolledWindow, GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC ); + if (HasFlag(wxALWAYS_SHOW_SB)) + { + gtk_scrolled_window_set_policy( scrolledWindow, GTK_POLICY_ALWAYS, GTK_POLICY_ALWAYS ); + + scrolledWindow->hscrollbar_visible = TRUE; + scrolledWindow->vscrollbar_visible = TRUE; + } + else + { + gtk_scrolled_window_set_policy( scrolledWindow, GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC ); + } m_scrollBar[ScrollDir_Horz] = GTK_RANGE(scrolledWindow->hscrollbar); m_scrollBar[ScrollDir_Vert] = GTK_RANGE(scrolledWindow->vscrollbar);