Re: Adding string to Memo
- From: Jamie <jamie_5_not_valid_after_5_Please@xxxxxxxxxxx>
- Date: Sun, 30 Oct 2005 11:03:47 -0800
J French wrote:
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.
seems strange that i always thought delphi kept a copy of the string in the stringlist ? so where are you saving anything?
-- Real Programmers Do things like this. http://webpages.charter.net/jamie_5
.
- Follow-Ups:
- Re: Adding string to Memo
- From: J French
- 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
- Re: Adding string to Memo
- From: J French
- Adding string to Memo
- Prev by Date: Transparent window
- Next by Date: Re: Transparent window
- Previous by thread: Re: Adding string to Memo
- Next by thread: Re: Adding string to Memo
- Index(es):
Relevant Pages
|