Added functionality for disabling the vertical scrollbar.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70676 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Julian Smart
2012-02-23 17:01:30 +00:00
parent bf973818a3
commit 12f5219fac
3 changed files with 31 additions and 1 deletions

View File

@@ -356,6 +356,7 @@ void wxRichTextCtrl::Init()
m_selectionAnchorObject = NULL;
m_selectionState = wxRichTextCtrlSelectionState_Normal;
m_editable = true;
m_verticalScrollbarEnabled = true;
m_caretAtLineStart = false;
m_dragging = false;
#if wxUSE_DRAG_AND_DROP
@@ -2555,7 +2556,7 @@ void wxRichTextCtrl::SetupScrollbars(bool atTop)
if (IsFrozen())
return;
if (GetBuffer().IsEmpty())
if (GetBuffer().IsEmpty() || !m_verticalScrollbarEnabled)
{
SetScrollbars(0, 0, 0, 0, 0, 0);
return;
@@ -4560,6 +4561,12 @@ bool wxRichTextCtrl::CanInsertContent(wxRichTextParagraphLayoutBox& WXUNUSED(con
return true;
}
void wxRichTextCtrl::EnableVerticalScrollbar(bool enable)
{
m_verticalScrollbarEnabled = enable;
SetupScrollbars();
}
#if wxRICHTEXT_USE_OWN_CARET