我需要更改RichTextBox
中的字符,我可以在row_textbox和column_textbox中放置一个整数,然后我可以更改该行和列中的字符。这里是示例代码:
//declarations
int row = Int16.Parse(tbox_row.Text);
int column = Int16.Parse(tbox_column.Text);
// Get the row
row = richTextBox1.SelectionStart;
int row_rb = richTextBox1.GetLineFromCharIndex(row);
// Get the column.
column = richTextBox1.GetFirstCharIndexFromLine(row);
int column_rb = row - column;
tbox_sample.Text = "line: " + row.ToString() + ", column: " + column.ToString();