Page 1 of 1

onSaveItemToFile

Posted: Sun Oct 05, 2014 9:11 pm
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]

Posted: Mon Oct 06, 2014 3:30 pm
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)

Posted: Mon Oct 06, 2014 3:58 pm
by mohsen24000
So good :)
Thanks a lot