trichview.com

trichview.support




Re: Working with RVData instead of TRichViewEdit


Return to index


Author

Message

Martin Holmes

Posted: 02/04/2005 0:40:29


Thanks Sergey. There's a problem with this for me, though; I'm building

a document from an XML DOM using a NodeIterator, and so far I've been

able to add items to the main TRichViewEdit with no problems, but I was

hoping to construct the table completely in memory before adding it to

the TRichView; I guess I can't actually apply formatting to data in a

table cell unless the table is part of a TRichViewEdit, then?


The heart of the problem is the unpredictable level of recursion in tables.


Cheers,

Martin



Sergey Tkachenko wrote:

> RVData has all necessary methods like TRichView.

> But it does not have methods of TRichViewEdit.

> You need to select the proper fragment in RVData and call method of the root

> editor,

>

> For example:

>

> var RVData: TCustomRVData;

>

> RVData := table.Cells[0,0];

> RVData := RVData.Edit; // required before making selection in cell

> TCustomRVFormattedData(RVData).SetSelectionBounds(...);

> RVE.ApplyParaStyle(StyleNum);

>

>

>

>>Hi there,

>>

>>I'm trying to add and style text using a TCustomRVData instead of a

>>TRichViewEdit, because I need to perform the operation recursively into

>>table cells. In a TRichViewEdit (RVE), I can do this kind of thing:

>>

>>                     RVE.AddNLWTag('', 0, StyleNum, 0);

>>                     RVE.ApplyParaStyle(StyleNum);

>>                     RVE.CurParaStyleNo := StyleNum;

>>

>>However, with a TCustomRVData, I don't have methods such as

>>"ApplyParaStyle" and "CurParaStyleNo" available. How can I apply styles

>>etc. to a TCustomRVData object?

>>

>>All help appreciated,

>>Martin

>

>

>





Powered by ABC Amber Outlook Express Converter