Пример #1
0
        void RichTextBoxMouseMove(object sender, System.Windows.Forms.MouseEventArgs e)
        {
            if (FRichTextBox.Lines.Length == 0)
            {
                return;
            }

            var charIndex    = FRichTextBox.GetCharIndexFromPosition(e.Location);
            int newHoverLine = FRichTextBox.GetLineFromCharIndex(charIndex);

            //avoid some flicker
            if (newHoverLine != FHoverLine)
//			if ((e.Location.X != FLastMouseHoverLocation.X) || (e.Location.Y != FLastMouseHoverLocation.Y))
            {
                FLastMouseHoverLocation = e.Location;
                FHoverLine = newHoverLine;
                ShowToolTip(e.X + DIPX(15));
                RedrawSelection();
            }
        }