Profile Picture

How to position a cursor?

Posted By John Kurmann 10 Years Ago
Author
Message
John Kurmann
Question Posted 10 Years Ago
View Quick Profile
Forum Newbie

Forum Newbie (3 reputation)Forum Newbie (3 reputation)Forum Newbie (3 reputation)Forum Newbie (3 reputation)Forum Newbie (3 reputation)Forum Newbie (3 reputation)Forum Newbie (3 reputation)Forum Newbie (3 reputation)Forum Newbie (3 reputation)

Group: Forum Members
Last Active: 10 Years Ago
Posts: 2, Visits: 2
I want to position the cursor and automatically scroll the view to a specified line number or character position. How to achieve that?

Nevron Support
This post has been flagged as an answer
Posted 10 Years Ago
View Quick Profile
Supreme Being

Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)

Group: Forum Members
Last Active: Last Week
Posts: 3,054, Visits: 3,985
Hi John,
You can use the Goto method to position the caret on different text locations. For example:

m_RichText.Content.Goto(ENTextDocumentPart.Line, "11", true);

Positions the caret on the 11th line. You can use this method to position on page, section, paragraph, line and bookmark index. You can also position the caret using the selection object if you know the text position where you want to place the caret:

m_RichText.Selection.MoveCaretTo(someTextPosition, false);
m_RichText.EnsureCaretVisible();

Hope this helps - let us know if you meet any problems or have any questions.


Best Regards,
Nevron Support Team



John Kurmann
Posted 10 Years Ago
View Quick Profile
Forum Newbie

Forum Newbie (3 reputation)Forum Newbie (3 reputation)Forum Newbie (3 reputation)Forum Newbie (3 reputation)Forum Newbie (3 reputation)Forum Newbie (3 reputation)Forum Newbie (3 reputation)Forum Newbie (3 reputation)Forum Newbie (3 reputation)

Group: Forum Members
Last Active: 10 Years Ago
Posts: 2, Visits: 2
Thank you Support Team,
That works perfect!



Similar Topics


Reading This Topic