onSaveItemToFile

General TRichView support forum. Please post your questions here
Post Reply
mohsen24000
Posts: 75
Joined: Fri Jan 06, 2012 8:13 pm

onSaveItemToFile

Post by mohsen24000 »

Hi Dear Admin,
when use SaveTextw an event occur : onSaveItemToFile
for example :

Code: Select all

if SaveFormat=rvsfText then begin
...
  if (RVData.GetItemStyle(ItemNo)=rvsPicture) then
  begin
     RVData.GetItemExtraStrProperty(ItemNo,rvespAlt,Str);
     OutStr := RVU_GetRawUnicode(Str);
  end;
...
dodefault:= false;
end;
it's very useful.

but, is it possible that output save in String instead File !?
I want change text of RV and save it in string, not creating any file![/code]
Sergey Tkachenko
Site Admin
Posts: 17564
Joined: Sat Aug 27, 2005 10:28 am
Contact:

Post by Sergey Tkachenko »

Despite of this name, this even happens both when saving to streams and files.
For example, SaveTextToStream and SaveTextToStreamW invoke this event.
So you can save to TMemoryStream or to TStringStream (if you use SaveTextToStreamW to save to TStringStream, this string stream must be created with TEncoding.Unicode in constructor)
mohsen24000
Posts: 75
Joined: Fri Jan 06, 2012 8:13 pm

Post by mohsen24000 »

So good :)
Thanks a lot
Post Reply