trichview.com

trichview.support




Re: How can I select text by TextStyleNo


Return to index


Author

Message

Sergey Tkachenko

Posted: 03/31/2003 14:58:17


Do you want to select all text having the given style? It's impossible since

RichView does not support selection consisting of nonadjacent blocks

(you can highlight all text of the given style by appliying another style -

see Yernar's answer with my corrections).

If you just want to select current text item (text of the same style without

line breaks), call


var ItemNo, Offs1, Offs2: Integer;


// always use TopLevelEditor when working with item indices


ItemNo := rve.TopLevelEditor.CurItemNo;

Offs1 := rve.TopLevelEditor.GetOffsBeforeItem(ItemNo);

Offs2 := rve.TopLevelEditor.GetOffsAfterItem(ItemNo);

rve.TopLevelEditor.SetSelectionBounds(ItemNo, Offs1, ItemNo, Offs2);

rve.TopLevelEditor.Invalidate;



>

> Hello everyone. I have a problem. I want to select text by CurTextStyleNo.

> What should I do?

> Thanks.





Powered by ABC Amber Outlook Express Converter