trichview.support
Re: That pesky first item |
Author |
Message |
Martin Holmes |
Posted: 02/21/2005 16:31:59 HI Sergey, If I avoid calling Format, then I get an error when I add a table, then start adding data inside the table cells. The error is thrown inside TCustomRVFormattedData.RestoreSelBounds, and it's a "list index out of bounds" error. The issue seems to be related to calling RVData.Edit on the table cell; if the document isn't formatted, I can't call that because it generates the error, and I don't think I can add data to a table cell without calling Edit, can I? Cheers, Martin Sergey Tkachenko wrote: > When building document, you should use viewer-style methods (i.e. methods > introduced in TRichView, not in TRichViewEdit). They can be called for > unformatted documents after Clear. > > Which method generates the exception? I'll try to suggest an alternative > > >>Hi there, >> >>I'm trying to build a document in an empty TRichViewEdit, item by item, >>reading from an XHTML DOM. This is working well except that for every >>RVData (the main control, or any contained table cells), there's always >>an initial empty paragraph item at the beginning, leading to an >>unnecessary blank line. If I call Clear before starting to add new >>items, then I get errors when adding items (because the control is >>unformatted, presumably); if I call Clear, then Format, I get that pesky >>item back again! If I delete the first item after building the document, >>to get rid of the blank line, then the "real" first paragraph style >>reverts to ParaStyles[0], which is not necessarily right. >> >>I've tried everything I can think of here -- any ideas? >> >>All help appreciated, >>Martin > > > |
Powered by ABC Amber Outlook Express Converter