ComponentOne List 8.0 for ActiveX
Parent Property

 

Parent Property

This property sets or returns the parent style of a named style object.

Syntax

style.Parent= variant

Remarks

Read/Write at run time and design time (with restrictions).

Property applies to Style object.

If a style has no parent, then this property returns a null variant.

The Parent property is used at run time to change the parent style from which the style in question inherits. Typically, this is done when creating a new style in code, as in the following example:

Dim BoldHeading As TrueDBList80.Style

Set BoldHeading = TDBList1.Styles.Add("BoldHeading")

BoldHeading.Parent = "Heading"

BoldHeading.Font.Bold = True

This code first creates a new style, BoldHeading, then sets its parent to the built-in Heading style. This causes the new style to inherit all attributes from the built-in style. The bold attribute of the new style's font is then overridden.

Note: For an independent style object, a trappable error will occur if you attempt to set the Parent property. An independent style object is not a member of the Styles collection, but is a standalone object created in code with a Dim or Set statement using the New keyword.

See Also

Style Object, Styles Collection

 

 


Copyright (c) GrapeCity, inc. All rights reserved.

Product Support Forum  |  Documentation Feedback