BorlandTalk.com Forum Index BorlandTalk.com
Borland discussion newsgroups
 
Archives   FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Richedit under Windows XP

 
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> Delphi VCL Components Using
View previous topic :: View next topic  
Author Message
MEE
Guest





PostPosted: Fri Nov 28, 2003 10:02 am    Post subject: Richedit under Windows XP Reply with 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.

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's 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



Back to top
Iain Macmillan
Guest





PostPosted: Fri Nov 28, 2003 12:23 pm    Post subject: Re: Richedit under Windows XP Reply with quote



In article <3fc71d6d (AT) newsgroups (DOT) borland.com>, "MEE" <mee-elec (AT) magic (DOT) fr>
wrote:


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?

Back to top
Display posts from previous:   
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> Delphi VCL Components Using All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2006 phpBB Group
SEO toolkit © 2004-2006 webmedic.