Article

From:
To:
Lukas Gradl
Subject:
Re: TwwDBRichEdit - Several Questions
Newsgroup:
woll2woll.products.infopower

Re: TwwDBRichEdit - Several Questions

When pasting/inserting setting SelStart, SelLength := 0 and then setting SelText works.

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
FYI: Phrase searches are enclosed in either single or double quotes
 
 
Originally created by
Tamarack Associates
Sun, 29 Sep 2024 01:19:39 UTC
Copyright © 2009-2024
HREF Tools Corp.