Flood.GUI.Controls.TextBox.OnKeyDelete C# (CSharp) Method

OnKeyDelete() protected method

Handler for Delete keyboard event.
protected OnKeyDelete ( bool down ) : bool
down bool Indicates whether the key was pressed or released.
return bool
        protected override bool OnKeyDelete(bool down)
        {
            base.OnKeyDelete(down);
            if (!down) return true;
            if (HasSelection)
            {
                EraseSelection();
                return true;
            }

            if (m_CursorPos >= TextLength) return true;

            DeleteText(m_CursorPos, 1);

            return true;
        }