*/
virtual bool CanInsertContent(wxRichTextParagraphLayoutBox& container, long pos) const;
+ /**
+ Enable or disable the vertical scrollbar.
+ */
+ virtual void EnableVerticalScrollbar(bool enable);
+
+ /**
+ Returns @true if the vertical scrollbar is enabled.
+ */
+ virtual bool GetVerticalScrollbarEnabled() const { return m_verticalScrollbarEnabled; }
+
// Command handlers
/**
/// Are we editable?
bool m_editable;
+ /// Is the vertical scrollbar enabled?
+ bool m_verticalScrollbarEnabled;
+
/// Are we showing the caret position at the start of a line
/// instead of at the end of the previous one?
bool m_caretAtLineStart;
*/
virtual bool CanInsertContent(wxRichTextParagraphLayoutBox& container, long pos) const;
+ /**
+ Enable or disable the vertical scrollbar.
+ */
+ virtual void EnableVerticalScrollbar(bool enable);
+
+ /**
+ Returns @true if the vertical scrollbar is enabled.
+ */
+ virtual bool GetVerticalScrollbarEnabled() const;
+
// Command handlers
/**
m_selectionAnchorObject = NULL;
m_selectionState = wxRichTextCtrlSelectionState_Normal;
m_editable = true;
+ m_verticalScrollbarEnabled = true;
m_caretAtLineStart = false;
m_dragging = false;
#if wxUSE_DRAG_AND_DROP
if (IsFrozen())
return;
- if (GetBuffer().IsEmpty())
+ if (GetBuffer().IsEmpty() || !m_verticalScrollbarEnabled)
{
SetScrollbars(0, 0, 0, 0, 0, 0);
return;
return true;
}
+void wxRichTextCtrl::EnableVerticalScrollbar(bool enable)
+{
+ m_verticalScrollbarEnabled = enable;
+ SetupScrollbars();
+}
+
#if wxRICHTEXT_USE_OWN_CARET