示例#1
0
        private void Code_Box_KeyUp(object sender, KeyEventArgs e)
        {
            int pos = Code_Box.SelectionStart;
            int row = Code_Box.GetLineFromCharIndex(pos);
            int col = pos - Code_Box.GetFirstCharIndexOfCurrentLine();

            if (Code_Box.SelectionLength > 0)
            {
                Id_Rows_Columns.Text = $"Linha: {row} | Coluna: {col} | Seleção: {Code_Box.SelectionLength}";
            }
            else
            {
                Id_Rows_Columns.Text = $"Linha: {row} | Coluna: {col}";
            }
        }