[Lazarus] how to TXMLPropStorage SaveToStream() LoadFromStream

FreeMan freeman35 at delphiturkiye.com
Wed Jul 2 14:56:57 CEST 2014


without savefile to disk

type
   TmyCustomXMLPropStorage = class(TCustomXMLPropStorage);
   { TForm1 }
   TForm1 = class(TForm)
     XMP: TXMLPropStorage;
...

procedure TForm1.Button1Click(Sender: TObject);
var st : TStream;
begin
   try
   st := TStream.Create;
    TmyCustomXMLPropStorage(XMP).XMLConfig.SaveToStream(st);
    memo1.Lines.LoadFromStream(st);
    //TmyCustomXMLPropStorage(XMP).XMLConfig.LoadFromStream(st);
   finally
     st.Free;
   end;
end;




More information about the Lazarus mailing list