trichview.com

trichview.support




Re: Styles and local style modifications with actions


Return to index


Author

Message

Sergey Tkachenko

Posted: 06/20/2002 21:10:31


Yes, new styles are created.

You can distinguish them by value of "Standard" property (all added styles

have it equal to False).

New styles may be added not only by actions, but also by RTF import.


All non-standard styles are removed on File|New.

Later, I'll add removing unused styles on document closing.



> I found that changing the TextStyle by Actions produces a new TextStyle

with

> same name as the original name. I modified this and put * behind the name,

> so I can distinguish them in the ComboBox.

>

>

> void __fastcall TReportForm1::rv_editorCurTextStyleChanged(TObject

*Sender)

> {

>     if (rv_editor->CurTextStyleNo >= text_combo->Items->Count) {

>         int cur= rv_editor->CurTextStyleNo;

>         RVStyle1->TextStyles->Items[cur]->StyleName =

>              RVStyle1->TextStyles->Items[cur]->StyleName + "*";

>         text_combo->Items->Assign(RVStyle1->TextStyles);

>     }

>     text_combo->ItemIndex= rv_editor->CurTextStyleNo;

> }

>

> Attention: I also noticed that new Styles are created even if not needed,

> i.e. if nothing is selected and the user presses the increase font size

> button!

>

>

>

>

> "Benedikt Weber" <weber@ggaweb.ch> wrote in message

> news:3d11e278@support.torry.net...

> > I am somewhat confused about the concept of styles. In the editor demo

> there

> > are two comboboxes for TextStyle and ParaStyle which show the current

> style

> > and can change it. That part is clear.

> >

> > Now with actions, the user can modify the style of any text. What

happens

> > with the styles? Are new styles created? And how would they show up in

the

> > ComboBoxes? It would be nice to have a new demo with Actions and

> ComboBoxes

> > with styles.

> >

> > Benedikt

> >

> >

>

>





Powered by ABC Amber Outlook Express Converter