示例#1
0
        private void ShowCursorLine()
        {
            int col = Txt_input.SelectionStart - Txt_input.GetFirstCharIndexOfCurrentLine() + 1;
            int row = this.Txt_input.GetLineFromCharIndex(this.Txt_input.SelectionStart) + 1;

            toolStripStatusLabel1.Text = "Line: " + row.ToString() + " Col: " + col.ToString();
        }
示例#2
0
 private void Txt_input_TextChanged(object sender, EventArgs e)
 {
     ShowRow(Txt_input.GetLineFromCharIndex(Txt_input.Text.Length) + 1);
     ShowCursorLine();
 }