trichview.com

trichview.support




Re: Styles and local style modifications with actions


Return to index


Author

Message

Benedikt Weber

Posted: 06/20/2002 17:36:05


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