trichview.com

trichview.support




Re: set different styles


Return to index


Author

Message

cali

Posted: 08/08/2003 12:39:31


Hello


I have this procedure:


procedure Select_Text(Line, Pos, Length: Integer);

  RichView.SetSelectionBounds(Line,Pos,Line,Pos+Length);

  RichView.ApplyTextStyle(3);

end;


If I write

    Select_Text(0,6,9);

    Select_Text(2,5,10);

only 1 Line has the other Style.


But if I write

    Select_Text(2,5,10);

    Select_Text(0,6,9);

Both lines has now the style.

Do I have to go down-top ?


Greets Matthias




Jaap-Willem van den Berg <j.berg@mecid.nl> wrote:

>use function 'TCustomRichView.SetSelectionBounds' to set selection (with


>your information) and then use functions

>'TCustomRichViewEdit.ApplyTextStyle' and

>'TCustomRichViewEdit.ApplyParaStyle' to change text or paragrapgh styles.

>

>See also help-files or demo projects.

>

>Greetings,

>Jaap-Willem van den Berg

>

>

>

>

>

>cali wrote:

>

>> I have loaded a text-file in richview with

>> RichView.LoadText(Filename,0,0,False).

>> Now I want to set another style to some parts

>> of the text. I have the following information:

>> Line Position Length

>> 2    10       11

>> 5    5        21

>> How can I assign another style to the above text-fragments.

>> Thanks

>> Cali

>>

>





Powered by ABC Amber Outlook Express Converter