Re: Adding string to Memo
- From: erewhon@xxxxxxxxxx (J French)
- Date: Sun, 30 Oct 2005 07:51:40 +0000 (UTC)
On Sat, 29 Oct 2005 12:11:04 -0700, Jamie
<jamie_5_not_valid_after_5_Please@xxxxxxxxxxx> wrote:
<snip>
>i could be wrong here but i thinkn selectstart is the
>API level indexer.
Yes, that is right
> if you use the "Text" property, it should give you
>the raw string like it is seen in the control.
> then using Insert(Memo1.Text, theStringToPutin,Memo1.SelectStart);
>memo1.Refresh and repaint may have to be used..
That would work, but it is making the machine (and Delphi) do a heck
of a lot of work
- the TMemo.Text property needs to be grabbed from the the real text
held within Windows, which boils down to a WM_GETTEXT, a string
creation, a string re-allocation as it is resized, then a WM_SETTEXT
It is possible that if one is going to do a lot of insertions in one
go (say a find an replace) that doing it outside the API would be
faster and clearer.
.
- Follow-Ups:
- Re: Adding string to Memo
- From: Jamie
- Re: Adding string to Memo
- References:
- Adding string to Memo
- From: Brian
- Re: Adding string to Memo
- From: Heinrich Wolf
- Re: Adding string to Memo
- From: Brian
- Re: Adding string to Memo
- From: Jamie
- Adding string to Memo
- Prev by Date: Re: Version after Version
- Next by Date: Re: Adding string to Memo
- Previous by thread: Re: Adding string to Memo
- Next by thread: Re: Adding string to Memo
- Index(es):