trichview.com

trichview.support




Re: set different styles


Return to index


Author

Message

Sergey Tkachenko

Posted: 08/11/2003 12:42:16


I did not study your code detaily. But the most probably, you do not take

into account that a number of items may be changed after applying a new

style to the selection (continuous text of the same style is usually one

item, texts of different styles are in different items)

Solutions:

- applying text styles starting from the end of text;

- using functions from http://www.trichview.com/support/files/rvlinear.zip

instead of SetSelectionBounds. These functions allow to set selection in

(SelStart, SelLength) coordinates, that are not changed when applying text

style.



> I don't exactly know why this is.

>

> Try to use TCustomRichViewEdit.ApplyStyleConversion instead, maybe this

> solves the problem.

>

> If that doesn't work try to use format or formattail.

>

>

> Greets,

> Jaap-Willem van den Berg

>





Powered by ABC Amber Outlook Express Converter