Adding New Fonts To Table Storage
Posted: Mon Jun 12, 2006 12:56 pm
I'm using a TRVEdit to make edits to information that is loaded and stored back into a TRVTableCell in a table in a different TRVEdit. The TRVStyle of the both TRVEdits is set to the same TRVStyle and the TRVEdits are set to AllowAddingStyles dynamically.
My problem is that I can only seem to add new fonts 'one at a time'. If I do that then the new font is stored back into the TRVTableCell properly. If I try to add MORE than one font during an editing session, all the information after the location of the second font change is not stored back into the TRVTable cell. Here's the code I'm using to store the information back into the TRVTableCell:
QMemo is the "Editor" TRVEdit and MasterRVTable.Cells[QNumber-1,1] is the TRVTableCell where the data is being stored.
QMemo.SaveRVFToStream(Stream, False);
Stream.Position := 0;
MasterRVTable.Cells[QNumber-1,1].Clear;
MasterRVTable.Cells[QNumber-1,1].Format(False);
MasterRVTable.Cells[QNumber-1,1].InsertRVFFromStream(Stream, 0, Dummy1, Dummy2, Dummy3, False);
MasterRVTable.Cells[QNumber-1,1].Format(False);
finally
Stream.Clear;
end;
What am I missing here?
Thanks in advance for your help!
My problem is that I can only seem to add new fonts 'one at a time'. If I do that then the new font is stored back into the TRVTableCell properly. If I try to add MORE than one font during an editing session, all the information after the location of the second font change is not stored back into the TRVTable cell. Here's the code I'm using to store the information back into the TRVTableCell:
QMemo is the "Editor" TRVEdit and MasterRVTable.Cells[QNumber-1,1] is the TRVTableCell where the data is being stored.
QMemo.SaveRVFToStream(Stream, False);
Stream.Position := 0;
MasterRVTable.Cells[QNumber-1,1].Clear;
MasterRVTable.Cells[QNumber-1,1].Format(False);
MasterRVTable.Cells[QNumber-1,1].InsertRVFFromStream(Stream, 0, Dummy1, Dummy2, Dummy3, False);
MasterRVTable.Cells[QNumber-1,1].Format(False);
finally
Stream.Clear;
end;
What am I missing here?
Thanks in advance for your help!