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);
Write the difference between globalization and localization?
Write the control which exposes LINQ features to the Web developers through ASP.NET data-source control architecture.
Differentiate between fragment caching and page-level caching?
Write the name of the control that you will use to make sure which values in the two different controls match?
Write down the various open source tool accessible for the VB.NET?
Elucidate how you create a permanent cookie?
Write down a brief note regarding rapid application development tool?
Briefly describe the properties in C# and state the advantages which are attained by using them in programs?
Write the differences between HTML and XML.
Write the main difference between UnBoxing and boxing.
18,76,764
1939990 Asked
3,689
Active Tutors
1413648
Questions Answered
Start Excelling in your courses, Ask an Expert and get answers for your homework and assignments!!