Board index » delphi » Richedit under Windows XP

Richedit under Windows XP


2003-11-28 06:02:58 PM
delphi107
Hello,
In my application, I scan line by line a TRichedit and I make some operation
for each line 'text remplacement).
Sometime I have to delete the line.
Here is the code:
Nb := RichEdit1.Lines.Count;
if Nb>0 then
For i := Nb-1 downto 0 do
begin
Buff := ProcessLine(RichEdit1.Lines[i],MustDelete);
if MustDelete then
begin
RichEdit1.Lines.Delete(i);
Application.ProcessMessages;
end
else
begin
RichEdit1.Lines[i] := Buff;
end;
end;
It's work very well under Windows 95.98 and NT.
But under Windows XP, it didn't work (the TRichedit diplay nothing)
Even with this code it is didn't works
Buff := RichEdit1.Lines[i];
RichEdit1.Lines[i] := Buff;
(I use Delphi 6 Pro SP2)
What I am doing wrong, what is specific to Windows XP ?
Thanks
Bernard
 
 

Re:Richedit under Windows XP

In article <XXXX@XXXXX.COM>, "MEE" <XXXX@XXXXX.COM>
writes:
Quote
Hello,

In my application, I scan line by line a TRichedit and I make some operation
for each line 'text remplacement).
Sometime I have to delete the line.
Well, don't use .lines, this is very unreliable.
Select the line and replace seltext with whatever you want it to be, to
delete select the carrriage return as well, and do seltext:='';
Not guaranteed to fix your problem but worth trying and should prevent some
future problems.
Quote
But under Windows XP, it didn't work (the TRichedit diplay nothing)
nothing? Empty, blank? or the same as it was before you tried to change the
text?