Changing a single character in RichEdit.Text?
From: Raptor (bogus_at_none.com)
Date: 12/29/04
- Next message: EurekaLog Team: "ANN: EurekaLog 4.6.1 (Catch every Exception showing Line#)"
- Previous message: Christakis John: "Re: HTML wysiwyg editors"
- Next in thread: Marc Rohloff [TeamB]: "Re: Changing a single character in RichEdit.Text?"
- Reply: Marc Rohloff [TeamB]: "Re: Changing a single character in RichEdit.Text?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Wed, 29 Dec 2004 02:31:11 -0800
How does one change a single character in RichEdit.Text?
(Yes, I know, press a key. Heh. I was thinking "code".)
RichEdit.Text[500000] := 'a';
doesn't work, "left side cannot be assigned to" and the
like.
{start timer}
aStr := RichEdit.Text;
aStr[500000] := 'a';
RichEdit.Text := aStr;
{stop timer}
works, but is that the best one can do?
While we're at it, how about this:
I load a RichEdit with 500,000 characters. I want to
change the last character using the above code. I click
a button to a check the GetTickCount, run the code, then
check again.
The first time I click the button, it takes 0.229 sec
using the code, but clicking the button again gives
0.03 seconds.
Clicking the button again gives the same 0.032 seconds.
Reload the text into the RichEdit, and the first timing
gives 0.229 sec, but another click gives about 0.03
seconds again.
Is this a cache/buffer issue? Or are the warp-core
alignment coils depolarizing the phase inducers and
distorting the annular confinement beam?
Raptor
- Next message: EurekaLog Team: "ANN: EurekaLog 4.6.1 (Catch every Exception showing Line#)"
- Previous message: Christakis John: "Re: HTML wysiwyg editors"
- Next in thread: Marc Rohloff [TeamB]: "Re: Changing a single character in RichEdit.Text?"
- Reply: Marc Rohloff [TeamB]: "Re: Changing a single character in RichEdit.Text?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]