editing tables problem
Posted: Thu Mar 19, 2009 2:01 pm
Hi.
I use this code to create a RichViewEdit in a separate thread:
FFormOwner is in main thread and is not visible.
I load a rtf using LoadRTFFromStream or PasteRTF. The text from RootEditor and/or table cells is modified and then the document is copied back into stream or Clipboard. All is done automatically.
The problem is that with the last version of TRichViewEdit every time I try to enter in edit mode at any table cell the program frezees. A few month ago it didn't do that.
I tried to debug the problem but in RVTInplace.pas I lost "track"...
I can't use a previous version because it has other problems...
I'd appreciate any sugestion.
Thank you in advance.
I use this code to create a RichViewEdit in a separate thread:
Code: Select all
FRVStyle := TRVStyle.Create(nil);
FRVStyle.Name := 'Style';
FRichViewEdit := TRichViewEdit.Create(FFormOwner);
with FRichViewEdit do
begin
ReadOnly := False;
Parent := FFormOwner;
Name := 'RVComponent';
Style := FRVStyle;
Color := clWhite;
Options := [rvoAllowSelection, rvoScrollToEnd, rvoTagsArePChars,
rvoAutoCopyText, rvoAutoCopyRVF, rvoAutoCopyImage,
rvoAutoCopyRTF, rvoFormatInvalidate, rvoDblClickSelectsWord,
rvoRClickDeselects];
RTFReadProperties.UnicodeMode := rvruOnlyUnicode;
RTFReadProperties.TextStyleMode := rvrsAddIfNeeded;
RTFReadProperties.ParaStyleMode := rvrsAddIfNeeded;
RVFOptions := [rvfoLoadDocProperties, rvfoSaveDocProperties,
rvfoSavePicturesBody, rvfoSaveControlsBody,
rvfoIgnoreUnknownPicFmt, rvfoIgnoreUnknownCtrls,
rvfoConvUnknownStylesToZero, rvfoConvLargeImageIdxToZero,
rvfoSaveBinary, rvfoSaveBack, rvfoLoadBack,
rvfoSaveTextStyles, rvfoSaveParaStyles, rvfoSaveLayout,
rvfoLoadLayout];
RTFOptions := [rvrtfSaveDocParameters, rvrtfDuplicateUnicode];
RTFReadProperties.ReadDocParameters := True;
Visible := True;
UndoLimit := 0;
Format;
BeginUpdate;
Clear;
end;
I load a rtf using LoadRTFFromStream or PasteRTF. The text from RootEditor and/or table cells is modified and then the document is copied back into stream or Clipboard. All is done automatically.
The problem is that with the last version of TRichViewEdit every time I try to enter in edit mode at any table cell the program frezees. A few month ago it didn't do that.
I tried to debug the problem but in RVTInplace.pas I lost "track"...
I can't use a previous version because it has other problems...
I'd appreciate any sugestion.
Thank you in advance.