The advice in the help file is to use style templates rather than text styles and para styles. I need some help with this when generating a document in code. The demo style templates project loads styles from a document or changes the styles at runtime so is not any help. Is there any simple code example to show how you can set up text and para formats (don't want to use the word 'style' here) for a simple text document with a header using style templates? And how the style template relates to parastyle and textstyle?
Or do style templates only apply to editing a document?
Thanks.
William
How to use style templates when creating document
-
- Site Admin
- Posts: 17566
- Joined: Sat Aug 27, 2005 10:28 am
- Contact:
Re: How to use style templates when creating document
StyleTemplates do not replace TextStyles and ParaStyles, they are applied on top of them.
Document still refers to items in TextStyles and ParaStyles, but items in TextStyles and ParaStyles can be linked to StyleTemplates.
StyleTemplates do not affect document appearance directly, they are rather provide a mechanism for convenient modification of TextStyles and ParaStyles. Similarly, MS Word's styles do not affect document appearance directly, but they allow changing text and paragraph attributes.
See http://www.trichview.com/help/styles_an ... lates.html
I'll create an example tomorrow.
Document still refers to items in TextStyles and ParaStyles, but items in TextStyles and ParaStyles can be linked to StyleTemplates.
StyleTemplates do not affect document appearance directly, they are rather provide a mechanism for convenient modification of TextStyles and ParaStyles. Similarly, MS Word's styles do not affect document appearance directly, but they allow changing text and paragraph attributes.
See http://www.trichview.com/help/styles_an ... lates.html
I'll create an example tomorrow.
-
- Site Admin
- Posts: 17566
- Joined: Sat Aug 27, 2005 10:28 am
- Contact:
Re: How to use style templates when creating document
Thank you Sergey.
Re: How to use style templates when creating document
This, the best description of the purpose of style templates!Sergey Tkachenko wrote: ↑Sat Jul 08, 2017 9:53 pm StyleTemplates do not replace TextStyles and ParaStyles, they are applied on top of them.
Document still refers to items in TextStyles and ParaStyles, but items in TextStyles and ParaStyles can be linked to StyleTemplates.
StyleTemplates do not affect document appearance directly, they are rather provide a mechanism for convenient modification of TextStyles and ParaStyles. Similarly, MS Word's styles do not affect document appearance directly, but they allow changing text and paragraph attributes.
See http://www.trichview.com/help/styles_an ... lates.html