trichview.com

trichview.support




Changing Style of TextStyles at runtime


Return to index


Author

Message

Jeff Luckey

Posted: 05/14/2003 0:23:35


Hello,


I am trying to italicize a word in a paragraph with code like:


  RichViewEditIn.Style.TextStyles[intStyleNum].Style := [fsItalic] ;

  RichViewEditIn.ApplyTextStyle(intStyleNum);

  RichViewEditIn.InsertText(DataSetIn.FieldByName('Heading').AsString + #13,

False);

  RichViewEditIn.InsertText('�  ', False);


  // Set text back to normal

  RichViewEditIn.Style.TextStyles[intStyleNum].Style := [] ;

  RichViewEditIn.ApplyTextStyle(intStyleNum);

  RichViewEditIn.InsertText(StripVenturaCodes(DataSetIn.FieldByName('Subhdg').AsString)

+ #13, False);


But all the text takes on the style of the last value for

  RichViewEditIn.Style.TextStyles[intStyleNum].Style


What is the proper way to change the TextStyle of words in a paragraph at

runtime?


Thanks,

Jeff Luckey





Powered by ABC Amber Outlook Express Converter