Hello,
I copy a text 1:1 from a RichViewEdit to a DBRichViewEdit and then I want to stand with the cursor in the DBRichViewEdit at the same position in the text as before in the RichViewEdit.
With the function: GetCurrentLineCol(Row,Col) I get the current row and column in the text.
But how can I set them again.
A command like SetCurrentLineCol does not exist.
Can someone help me here?
Greetings from Bavaria in Germany
AsterixBT
Set Cursorposition (Line, Col) in RichViewEdit
-
- Site Admin
- Posts: 17564
- Joined: Sat Aug 27, 2005 10:28 am
- Contact:
Re: Set Cursorposition (Line, Col) in RichViewEdit
The simplest way is using functions from RVLinear unit
If you need only to store the caret position, use RVGetLinearCaretPos and RVSetLinearCaretPos.
If you want to store not only the caret position, but also selection, use RVGetSelectionEx/RVSetSelectionEx.
If you need only to store the caret position, use RVGetLinearCaretPos and RVSetLinearCaretPos.
If you want to store not only the caret position, but also selection, use RVGetSelectionEx/RVSetSelectionEx.
Re: Set Cursorposition (Line, Col) in RichViewEdit
Hello,
thank you very much for the answer.
RVGetLinearCaretPos and RVSetLinearCaretPos worked fine in the first test.
Greetings from Bavaria in Germany
AsterixBT
thank you very much for the answer.
RVGetLinearCaretPos and RVSetLinearCaretPos worked fine in the first test.
Greetings from Bavaria in Germany
AsterixBT