ComponentOne True DBInput Pro 8.0
Add Method (ChildrenCollection)

 

Add Method (ChildrenCollection)

Adds an object to the collection and returns a reference to the created object.

Syntax

object.Add ([Index], Key, [ForeColor], [BackColor])

Arguments

index is an optional integer specifying the position where you want to insert the object. If you do not specify an index, the object is added to the end of the collection.

key is a required, unique string that identifies the object. Use key to retrieve a specific object. This is equivalent to setting the Key:objects property of the new object after the object has been added to the collection.

forecolor is an optional variant that indicates the color used for drawing the text. This is equivalent to setting the ForeColor property in the new AttribStyle or StyleSets object.

backcolor is an optional variant that indicates the color used for drawing the background. This is equivalent to setting the BackColor property in the new AttribStyle or StyleSets object.

Return Value

Object

Remarks

The collections are 1-based. A new object can easily be added by using the property page at design time, and using the Add method at runtime. The following example shows how attribute styles can be added.

' Add attribute styles to the control.

Calendar.AttribStyles.Add , "SelAttrib", _

 - RGB(255,255,255), RGB(0,0,255)

Calendar.AttribStyles.Add , "SunAttrib"

Calendar.AttribStyles.Add , "SatAttrib"

This example adds three attribute styles to the collection.

See Also

Item Property (ChildrenCollection)

AddObj Method (ChildrenCollection)

 

 


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

Product Support Forum  |  Documentation Feedback