Raymond Kennington
Lukas Gradl wrote:
> > Hello! > > I want to save the Contents of a wwDBRichEdit-Component to a database > and insert them into another wwDBRichEdit at a known position in the > Text. > This works fine for whole Paragraphs, but when using short Text's or > single Words there is a Problem: An CR-LF is inserted after the > inserted Text. > Im copying with GetRTFSelection and PutRTFSelection. > > Example: > ... > Var RE1,RE2:TwwDBRichEdit; > ms:TMemoryStream; > > ... > begin > ms:=TMemoryStream.Create; > RE2.CopyRichEditFromBlob(Blobfield); > RE2.SelectAll; > RE2.GetRTFSelection(ms); > ms.Position:=0; > RE1.PutRTFSelection(ms); > ms.Free; > end; > > Result: > the "|" character indicates the Cursor-Position > > RE1-Content: > This is |a test-text for demonstration<CRLF> > With two lines of Text > > RE2-Content after CopyRichEditFromBlob(Blobfield); > short > > There is no CRLF in RE2. > Then the SelectAll, GetRTFSelection, PutRTFSelection is done > > After that there is the following Text in RE1 (the "|" character > indicates the Cursor-Position) > > RE1-Content: > This is short > |a test-text for demonstration<CRLF> > With two lines of Text > > Anyone an Idea how to solve this problem? > > Second I want to give my Users a Ruler like in the > wwDBRichEdit-Editwindow. In wwrich.pas a TwwRulerPanel is used. Is > this Panel anywhere to use as a Component? > > Thanks for your help > > Lukas