FViewer in RVHTMLImport

General TRichView support forum. Please post your questions here
Post Reply
jgkoehn
Posts: 160
Joined: Thu Feb 20, 2020 9:32 pm

FViewer in RVHTMLImport

Post 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?
jgkoehn
Posts: 160
Joined: Thu Feb 20, 2020 9:32 pm

Re: FViewer in RVHTMLImport

Post 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
Sergey Tkachenko
Site Admin
Posts: 15695
Joined: Sat Aug 27, 2005 10:28 am
Contact:

Re: FViewer in RVHTMLImport

Post 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)
Post Reply