trichview.com

trichview.support




Re: Consistent attributes


Return to index


Author

Message

Sergey Tkachenko

Posted: 10/27/2003 10:22:03


You need to iterate through all selected text items and compare properties

of their text styles.

For example, this work is done in RichViewActions, TrvActionFontEx.

When it's run, it determines which attributes are "consistent" and their

values.

It writes a list of "consistent" attributes in ValidProperties property, and

their values in the corresponding properties.

This work is performed in the procedure TrvActionFontEx.GetFromEditor.

When this action displays its dialog, only "consistent" attributes are set

(others are in indeterminate state: indeterminate checkboxes, comboboxes

with no selection, blank numeric editors, etc.). So, if user just presses OK

without making any modifications in this dialog, nothing will be changed.


>

> If the user selects some text, is there a way to get, which style

attributes

> are consistent among all selected styles, in order to reflect that

properly

> in the user GUI.

>

> For example is the user selects text, which contains text in Arial and

text

> in Tahoma, I want my application to understand that and to show that more

> text in more than one font is selected (for example in Word and in WordPad

> when text in more than one font is selected they clear Font box).

>

> I will try to clarify this, if you could not understand it.

>

> Regards,

> Petko





Powered by ABC Amber Outlook Express Converter