Example #1
0
        public static void GetLineAndPosFromIndex(this TextBoxBase self, int index, out int line, out int pos)
        {
            line = self.GetLineFromCharIndex(index);
            int linepos = self.GetFirstCharIndexFromLine(line);

            pos = index - linepos;
        }
 private static void DelLine(TextBoxBase rtb, int index) =>
 rtb.Text = rtb.Text.Remove(rtb.GetFirstCharIndexFromLine(index) - 1, rtb.Lines[index].Length + 1);