Board index » delphi » TRichEdit.Lines.Count Giving Incorrect Count?

TRichEdit.Lines.Count Giving Incorrect Count?

I'm seeing a richedit.Lines.Count "reporting" a count in between words
of each line - the code below is inserting the ">" char in between
each word of each line instead of only at the beginning of each
line!!!

Why is the .Lines.Count doing this?

Thank you...

Ralph

for i := 0 to richEdit_Body.Lines.Count-1 do
    begin
         richEdit_Body.Lines[i] := '>' + richEdit_Body.Lines[i];
    end;

 

Re:TRichEdit.Lines.Count Giving Incorrect Count?


Ralph Freshour heeft geschreven in bericht
<36ed94d9.5378...@news.psn.net>...
:I'm seeing a richedit.Lines.Count "reporting" a count in between words
:of each line - the code below is inserting the ">" char in between
:each word of each line instead of only at the beginning of each
:line!!!
:
:Why is the .Lines.Count doing this?
:
:Thank you...
:
:Ralph
:
:for i := 0 to richEdit_Body.Lines.Count-1 do
:    begin
:         richEdit_Body.Lines[i] := '>' + richEdit_Body.Lines[i];
:    end;
:

Ralph,

I can't reproduce this phenomenon (WIN-NT/WIN95/D3.00)
There must be something else in your code....

Regards,
Dirk Claessens
______________________________________________
dirk DOT claessens AT village DOT uunet DOT be
Mailheader is  forged - sorry...
______________________________________________

Re:TRichEdit.Lines.Count Giving Incorrect Count?


There is a Tab component that this richedit control is on - if I click
on the tab that shows this control, then it works OK - that is, the
.Count is correct and the '>' char only gets inserted at the beginning
of each line.  If I don't click on the tab that makes the richedit
control visible then it does not work right - I tried making the
richedit control visible in the default tab but that did not work.

My tab control has the following tabs:

compose
body
options
to
cc
bcc
attachments

The richedit in question is made visible when the to tab is clicked on
- this is the type of tab where all controls are visible and as each
tab is clicked on I have to make only ones that should be vivible,
visible and size/pos them.

The tab defaults to the compose tab but it is in that tab that I need
to access the richedit control which is still 'hidden'.  If I click on
the to tab this seems to 'initialize' the richedit somehow and then it
will work OK.

I found a solution to this problem - I have made this richedit control
visible on the compose tab but have it 'behind' another control so it
can't be seen - now when the compose tab needs to access this richedit
control it works OK - this is a kludge I know but it is the only way I
could get it work thus far...

Ralph

On Wed, 17 Mar 1999 20:45:11 +0100, "Dirk Claessens"

Quote
<will.bou...@back.com> wrote:
>Ralph Freshour heeft geschreven in bericht
><36ed94d9.5378...@news.psn.net>...
>:I'm seeing a richedit.Lines.Count "reporting" a count in between words
>:of each line - the code below is inserting the ">" char in between
>:each word of each line instead of only at the beginning of each
>:line!!!
>:
>:Why is the .Lines.Count doing this?
>:
>:Thank you...
>:
>:Ralph
>:
>:for i := 0 to richEdit_Body.Lines.Count-1 do
>:    begin
>:         richEdit_Body.Lines[i] := '>' + richEdit_Body.Lines[i];
>:    end;
>:

>Ralph,

>I can't reproduce this phenomenon (WIN-NT/WIN95/D3.00)
>There must be something else in your code....

>Regards,
>Dirk Claessens
>______________________________________________
>dirk DOT claessens AT village DOT uunet DOT be
>Mailheader is  forged - sorry...
>______________________________________________

Other Threads