Skip to main content
Known Participant
July 17, 2008
Question

Text Attribute

  • July 17, 2008
  • 2 replies
  • 336 views
Hello
i have written some code to apply a text attribute on some text. now i want that as soon as the text is finished that attribute do not continue on the next text. i.e. i applied bold on "NAME". now after name i want this attribute to be finished until it is applied again by selecting from the menu. can any one give me the clue to solve this issue.
I hope my issue is cleared enough.
thanks
Regards,
MS Chaudhary
This topic has been closed for replies.

2 replies

Known Participant
July 18, 2008
Hello,
thanks for your reply m.momchilov. but my question was related to some other problem i think i was unable to express it clearly. any how this issue has been resolved.
In the custom defined text attribute there is a method for automatic continuation just turn it off by applying IAttrReport::kNeverContinue enumeration. then the text applied to some range will not continue if you add any more text .
Thanks
Regards,
MS Chaudhary
Participant
July 17, 2008
hi,<br /><br />i think you can use the following code:<br /><br /> InterfacePtr<ITextTarget> targetboss ((ITextTarget*)::CreateObject(kTextSuiteBoss, IID_ITEXTTARGET));<br /> if (targetboss)<br /> {<br /> targetboss->SetTextFocus( textModelRef, RangeData(index, textLen ));<br /> }<br /><br /> InterfacePtr<ITextAttributeSuite> iTextAttributeSuite (targetboss, UseDefaultIID());<br /> if (iTextAttributeSuite)<br /> {<br /> //iTextAttributeSuite->..... set attributes to the specific range<br /> }