Place a cursor on given line-character in C sharp
How can we programmatically place a cursor on the given line or on the character in a RichTextBox control in the C#?
Expert
RichTextBox control has Lines array property that demonstrates one item of the array in separate line. Every line entry has a Length property that can be used to exactly position the cursor at the character, which is shown in the following code:
private void GoToLineAndColumn(RichTextBox RTB, int Line, int Column)
{
int offset = 0;
for(int i = 0; i < Line -1 && i < RTB.Lines.Length; i++)
offset += RTB.Lines[i].Length + 1;
}
RTB.Focus();
RTB.Select(offset + Column, 0);
Illustrate the term ASP.NET?
Write the advantages of the code-behind feature?
Write about the Dynamic update?
Write the difference between the Procedural and Object-oriented programming?
What is covariance and contra-variance in .NET Framework 4.0 with example for each.
Name some of the binders which are offered by .NET Framework 4.0.
Distinguish among javascript and vbscript?
Write down the core of WPF assemblies?
What is meant by the Managed Extensibility Framework?
Explain the code-behind feature of ASP.NET?
18,76,764
1922181 Asked
3,689
Active Tutors
1412557
Questions Answered
Start Excelling in your courses, Ask an Expert and get answers for your homework and assignments!!