m_selectionAnchorObject = NULL;
m_selectionState = wxRichTextCtrlSelectionState_Normal;
m_editable = true;
+ m_verticalScrollbarEnabled = true;
m_caretAtLineStart = false;
m_dragging = false;
#if wxUSE_DRAG_AND_DROP
ScrollIntoView(m_caretPosition, WXK_LEFT);
- if (deletions > 0)
+ // Always send this event; wxEVT_COMMAND_RICHTEXT_CONTENT_DELETED will be sent only if there is an actual deletion.
+ //if (deletions > 0)
{
wxRichTextEvent cmdEvent(
wxEVT_COMMAND_RICHTEXT_DELETE,
ScrollIntoView(m_caretPosition, WXK_LEFT);
- if (deletions > 0)
+ // Always send this event; wxEVT_COMMAND_RICHTEXT_CONTENT_DELETED will be sent only if there is an actual deletion.
+ //if (deletions > 0)
{
wxRichTextEvent cmdEvent(
wxEVT_COMMAND_RICHTEXT_DELETE,
ScrollIntoView(m_caretPosition, WXK_LEFT);
- if (deletions > 0)
+ // Always send this event; wxEVT_COMMAND_RICHTEXT_CONTENT_DELETED will be sent only if there is an actual deletion.
+ //if (deletions > 0)
{
wxRichTextEvent cmdEvent(
wxEVT_COMMAND_RICHTEXT_DELETE,
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