trichview.com

trichview.support




Re: How to find the style of each character


Return to index


Author

Message

Katerina Sedivy

Posted: 06/21/2002 21:52:30


1st: I am using the function you gave me early on:


function GetTextFromParagraph(rv: TCustomRichView; ParagraphIndex: Integer):

String;

var i,j: Integer;

begin

  Result := '';

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

    if rv.IsParaStart(i) then

      dec(ParagraphIndex);

    if ParagraphIndex<0 then begin

      for j := i to rv.ItemCount-1 do begin

        if (j>i) then begin

          if rv.IsParaStart(j) then

            break;

          if rv.IsFromNewLine(j) then

            Result := Result+#13;

        end;

        if rv.GetItemStyle(j)>=0 then

          Result := Result + rv.GetItemText(j)

      end;

      break;

    end;

  end;

end;


While I do this I would like to know the style of each character within each

paragraph I'm retrieving.


2nd: I also would like to know the styles being used at the caret's

position.


Thank you very much.





Powered by ABC Amber Outlook Express Converter