A Long type property. Gets or sets the style index (the number of the style in the style collection of the document), which is applied by default to new shapes created in the document.
Applies to: Document object
[[Let] styleIndexRet =] object.DefStyle [Let] object.DefStyle = styleIndexSet |
The DefStyle property syntax has these parts:
Part | Description |
object |
Required. An expression, that returns a Document object. |
styleIndexRet | Optional. A Long type variable. |
styleIndexSet | Required. An expression that returns a Long value. The index of the style in the style collection of the document. |
If styleIndexSet is less than -1 or greater than the number of the styles in the style collection of the document, the DefStyle property doesn't change its value. Also, the DefStyle property can take the following values: 0 - normal style, the style set in ConceptDraw by default, -1 - no style.
To find out the number of styles in the style collection of the document, use the StylesNum method. To retrieve a style by its index in the style collection of the document, use the Style method.
See Also |
FindStyle method, Style method, StyleByName method, StylesNum method, Style object |