Page 1 of 1

FViewer in RVHTMLImport

Posted: Fri Apr 16, 2021 4:21 pm
by jgkoehn
Greetings,
I am using

Code: Select all

FViewer.SetSelectionBounds(GStartItem+1,FViewer.GetOffsBeforeItem(GStartItem+1)+Length(GLinkStr),
                                             GEndItem,FViewer.GetOffsAfterItem(GEndItem)-7);
But with tables this has a problem: However, I can't find TopLevelEditor like

Code: Select all

FViewer.TopLevelEditor.SetSelectionBounds(GStartItem+1,FViewer.GetOffsBeforeItem(GStartItem+1)+Length(GLinkStr),
                                             GEndItem,FViewer.GetOffsAfterItem(GEndItem)-7);
Am I missing something?

Re: FViewer in RVHTMLImport

Posted: Fri Apr 16, 2021 5:37 pm
by jgkoehn
Basically I am working on copying content within a table and pasting it next to it
so

Code: Select all

<link>Content to copy</link>
<link>Content to copy</link>Copied to here

Re: FViewer in RVHTMLImport

Posted: Mon Apr 19, 2021 8:40 am
by Sergey Tkachenko
TopLevelEditor is an editor containing the caret.
In viewer (TRichView), there is no caret, and there is no editor.

You can use table.Cells[r,c].SetSelectionBounds
(but before selecting in cell, call table.Cells[r,c].Edit, or table.EditCell(r,c), it is necessary even in a viewer)