Styles and templates
Posted: Sat Aug 14, 2021 8:38 pm
I guess I'm missing something with styles. Here's what I want to do.
I have set up a style template with a paragraph background color of clMaroon. And then set the text to courier and color to white. It's the only style template in the RVStyle1. I've tried applying it with:
Nothing works. The selected text in the rve never changes, the para background never changes. I want to set up a number of template presets, and be able to apply them easily in code. I'd prefer not setting up separate text and para styles but to do it with a template.
Any help appreciated!
I have set up a style template with a paragraph background color of clMaroon. And then set the text to courier and color to white. It's the only style template in the RVStyle1. I've tried applying it with:
Code: Select all
//rve.ApplyParaStyleTemplate(rve.Style.StyleTemplates.FindItemByName('Style 1').Index, true);
//rve.ApplyTextStyleTemplate(rve.Style.StyleTemplates.FindItemByName('Style 1').Index, true);
//rve.ApplyStyleTemplate(rve.Style.StyleTemplates[0].Index, true);
rve.ApplyStyleTemplate(0);
rve.SetFocus;
Any help appreciated!