trichview.com

trichview.support




Re: equal of richedit.lines.count in delphi


Return to index


Author

Message

Sergey Tkachenko

Posted: 09/10/2003 18:01:03


Simple example:


for i := 0 to rv.ItemCount-1 do

  if (rv.GetItemStyle(i)>=0) and

     (rv.GetItemTextA(i)<>'') then

    Genie.Speak(rv.GetItemTextA(i));


Or Genie must speak each paragraph, not each item separately? (paragraphs

can consist of multiple text items having different text formatting)

In this case:


s := '';

for i := 0 to rv.ItemCount-1 do

begin

  if rv.IsFromNewLine(i) then begin

    if s<>'' then

      Genie.Speak(s);

    s := '';

  end;

  if rv.GetItemStyle(i)>=0 then

    s := s + rv.GetItemTextA(i);

end;

if s<>'' then

  Genie.Speak(s);


This example skips all text in table cells. If you need to read text from

tables, I can create more advanced example.



>

> I need to count the lines like in a richedit in Delphi:

> How can I do with trichviewedit?

>

> samples:

> var i:integer;

>     S:string;

>    begin

>    Genie.Show (true);

> !!!!!  for i:=0 to reApp.Lines.Count-1 do !!!!

>   begin

>     S:=reApp.Lines[i];

>     if S<>'' then Genie.Speak(S,'');

>   end;

>

>





Powered by ABC Amber Outlook Express Converter