Yes I did, RTF. Any way to Append such content?
Beiträge von Marcelo
-
-
Hallo There , back to this situation again after a while, so thanks for answers.
Ok such method don't worked to me. So as I need to get the text of the stream I wasted some time working on transform the stream to String function that works pretty well!
Now that I got the String from stream how to Append each RTF formated String on WPRichText ? I tried Fast Add but it treats only pure text
prp.Text := StreamToString(Stream);
WPLaudoLabDetalhe.FastAddText(prp);
Code
Alles anzeigenfunction StreamToString(aStream: TStream): string; var SS: TStringStream; begin if aStream <> nil then begin SS := TStringStream.Create(''); try SS.CopyFrom(aStream, 0); Result := SS.DataString; finally SS.Free; end end else Result := ''; end;
the function above works pretty fine !
Now Calling the method:Codefirst := true; while not dmSGA.QBusca.Eof do begin TBlobField(dmSGA.QBusca.FieldByName('LAUD_TEXTO')).SaveToStream(Stream); Stream.Position := 0; WPLaudoLabDetalhe.LoadFromString(StreamToString(Stream),'AUTO',first); dmSGA.QBusca.Next; first := false; end;
It just dont works !
Should be another method to threat RTF tags?
Thank you very much1 -
Than you very much, but it does not works, unfortunately.
I took th decision to transform STREAMS to Strings and get tet with formating tags. After that concatenate the strings appending one after other.
Wich methods is the appropriated to display that text?
-
I have a field in a database table that holds the contents of a WPRichText component with tags as Stream
I would like to concatenate the streams of a select on that field:
"Select TOP 5 STREAM_TEXT From Table"
And display these five contents on a WPRichText
Stream := TMemoryStream.Create;
TempStream := TMemoryStream.Create;
WPRichTextResult.ReadOnly := False;
WPRichTextResult.Clear;
WPRichTextResult.AsString := '';
while not dmSGA.QBusca.Eof do
begin
TBlobField(dmSGA.QBusca.FieldByName('STREAM_TEXT')).SaveToStream(TempStream);
Stream.CopyFrom(TempStream, 0);
Stream.seek(0, soEnd);
Stream.CopyFrom(TempStream, 0);
WPRichTextResult.LoadFromStream(Stream); // load stream contents into rich
dmSGA.QBusca.Next;
end;
Stream.Free;
TempStream.Free;
-
On WPRichEdit Component
-
Is there any way to avoid
Invalid Class Type Cast at Design Time annoyance ?
It happens on Delphi XE2 design time when click on component.
Thanks in advance.
-
I did this way using Fast Reports
frxRepP.PrepareReport;
frxRepP.PrintOptions.ShowDialog := False;
frxRepP.PrintOptions.Printer := FNameImp; //FNameImpis a print name loaded from a .ini file option
frxRepP.SelectPrinter;
if rgOut.ItemIndex = 0 then
frxRepP.ShowReport
else
frxRepP.Print;
frxRepP.PrintOptions.Printer := FDefaultImp; // Returns to default printer also loaded from .ini file
frxRepP.SelectPrinter;
-
We Have plans to upgrde to Delphi 10.2.2 Tokyo does it means we need repurchase a new license from WPCubed?
-
Thank you
I solved it with simple Regular Expression and rewrite memo content Twice
Regex.Create('({\\)(.+?)(})|(\\)(.+?)(\b)|}$');
-
Ok but this solution above would work for average VCL application.
I mean, I need retrieve data previouly recorded on Database and show it in a new Android APP made with Firemonkey there is no TWPRichedit for Firemonkey yet.
Yes I can simple get it from stream from database easily but, it comes with all rtf formating.
Maybe a way to strip RTF format from string stream would work or transorm such formating onto HTML to present on mobile.
Thank you. -
I use Delphi DX10.1 Berlin
I have a field in a database, which is filled by a WPRichEdit by Client/Server application through a TText Stream.
Now I need to build a mobile application that reads this mentioned field.
Unfortunately the FMX library does not have a component for RichText, only a TMemo component.This component loads text, however, it displays with their RTF "Tags" formatting characters, Trying to find a solution In this scenario I reached two alternatives:
First - Find a way to remove the RTF "tags" streams and display content over FMX memo.
Or
Second - Transforming TWPRichEdit RTF Tagas to the equivalent HTML Tags and display on a WebBorwser component.
Is there a simple solution to one of the above two alternatives?