Re: Merge cell table corruption?
Posted: 07/31/2004 21:15:26
> 1. Entire table color changes when setting cell color.
> The function call that I used was SetCellColor(Value: TColor; Row,Col:
> When I call this method the entire table color changed AFTER merging a
> on the table. I replaced this function with Table.Cells[,].Color and it
> fixed the problem.
I do not understand why SetCellColor does not work.
I created a test code:
var rve: TCustomRichViewEdit;
if RichViewEdit1.GetCurrentItemEx(TRVTableItemInfo, rve, item) then begin
table := item as TRVTableItemInfo;
table.SetCellColor(clRed, 0, 0);
and it works as expected
(this is a typical code for table editing operations;
SetUndoGroupMode(true)...SetUndoGroupMode(false) is not necessary because
there is only one operation here;
BeginItemModify...EndItemModify is not necessary because this operations
does not change table size, so Invalidate is used instead).
Unlike direct assignment to Cell.Color, the operation above can be undone by
> 3. Pasting HTML
> There was a misunderstanding. The problem that I had was the following.
> I create a table in RVE. I export the HTML. I open it in IE. I copy
> content from IE (Not the source) and paste it into RVE. This gets treated
> as RTF then. It works well but the problem was that if I created and
> a table with a merged cell then I could not copy and paste the displayed
> html in IE back into the RVE. However, after I changed the two items
> the problem doesn't occur anymore. (?)
Ok, at least this problem is solved.
Powered by ABC Amber Outlook Express Converter