ComponentOne True DBInput Pro 8.0
Parent Property (DSTStyle)

 

Reference> DSTStyle Object> DSTStyle Object Properties> Parent Property (DSTStyle)

Parent Property (DSTStyle)

Sets/returns the parent style of a DSTStyle object.

Syntax

object.Parent= DSTStyle

Read/Write at run time. Not available at design time.

Remarks

This property sets or returns the parent style of a named style object. When the object is first created, Nothing will be set by default.

The Parent property is used at run time to change the parent style from which the style settings inherit. This property makes it easier and faster for the user by creating a complete clone of the parent object. Typically, this is done when creating a new style in code, as in the following example:

Dim objTZ As New TDBTZoneX6Lib.TDBTZoneX

Dim China As TDBTZoneX6Lib.DSTStyle

Set China = objTZ.DSTStyles.Add(, "CN", "China Beijing")

China.Parent = "US"

China.StartMonth = dbiMarch

This code first creates a new Daylight Savings Time style named "China", then sets its parent to an user-defined style named "US". This causes the new style to inherit all attributes from the style "US". The StartMonth property of the new style is then overridden. Note that the Parent property should not be defined after setting the DSTStyle object properties. If do so, this will cause all property settings to be initialized to the parent style.

This property also allows you to pass in an object or an index number that points to an element within the DSTStylesCollection.

See Also

Key Property (DSTStyle)

Name Property (DSTStyle)

 

 


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

Product Support Forum  |  Documentation Feedback