MTStyle Property (MTNVS collection)



Retrieves or sets style settings for this collection. These settings determine whether names are case sensitive, locale sensitive, or may contain leading or trailing blanks.



object.MTStyle [= StyleSettings]

The MTStyle property syntax has these parts:




An object expression that evaluates to an object in the Applies To list.


An expression made up of one or more values from the pinvStyleConstants enumeration, as described in Settings. You may combine values by adding, or by using logical or.



The settings for StyleSettings are:




In all name comparisons for this collection, uppercase and lowercase characters are considered different.


Name comparisons for this collection are ordered according to the lexicographic order defined for the current system locale, rather than the character set order.


Names in this collection may contain leading spaces.


Names in this collection may contain trailing spaces.



When the collection is initially created, no style settings are set.

This property can only be changed if the collection is empty.

If pinvCaseSensitive is not set, the collection is case-preserving but not case-sensitive; that is, names are preserved in the form in which they were first added.

The pinvLocaleSensitive setting is independent of the pinvCaseSensitive setting. Locale-sensitive comparisons may be case-sensitive or case-insensitive.

Lexicographic comparison can be quite slow. You should only specify pinvLocaleSensitive if you are working in a language where there is a difference between the character set order and the lexicographic character order, and this difference is important for the name comparison.

Normally, leading and trailing spaces are removed from names before they are added to collections. The pinvAllowLeadingSpace and pinvAllowTrailingSpace settings modify this behavior.

The pinvAllowLeadingSpace and pinvAllowTrailingSpace settings affect only names. Values, if they are strings, are always allowed to have leading and trailing spaces.

MTStyle is marked hidden in the type library. To see this property in an object browser, you may need to select the browser’s “Show Hidden Members” option.


Trappable Errors

In addition to generic errors (such as Out of Memory), the following errors may occur:




The collection cannot be modified because it is frozen; that is, the collection's MTReadOnly flag is true.


This property cannot be changed because the collection is not empty.

Enabling Operational Intelligence