Adds a GanttItem object to the GanttItems collection.
Syntax:
ActiveGanttVBNCtl.GanttItems.Add(Caption As String, RowKey As String, StartDate As Date, EndDate As Date, [Key As String = ""], [StyleIndex As String = ""], [Picture As String = ""], [LayerIndex As String = "0"])
The Add Method (GanttItems Collection) syntax has these parts:
| Part |
Description |
| ActiveGanttVBNCtl.GanttItems |
An object expression that evaluates to an ActiveGantt Schedule Control's GanttItems collection. |
| Caption |
(Required). A string value that determines the text of the GanttItem object. |
| RowKey |
(Required). A string value that determines the associated Row object for the GanttItem object. |
| StartDate |
(Required). A Date value that determines the start date of the GanttItem object. |
| EndDate |
(Required). A Date value that determines the end date of the GanttItem object. |
| Key |
(Optional). A string value that uniquely identifies the GanttItem object. |
| StyleIndex |
(Optional). A string value that specifies the index or key of the Style object associated with the GanttItem object. |
| Picture |
(Optional). A string value that specifies the absolute path and filename of the picture to be displayed. |
| LayerIndex |
(Optional). A string value that specifies the index or key of the Layer object associated with the GanttItem object. |
Remarks:
This method adds objects at the top of the list. In order to retrieve the index of the GanttItem object that was added use the collection's Count property.
See Also:
GanttItems Property , Clear Method (GanttItems Collection), Count Property (GanttItems Collection), Item Property (GanttItems Collection), Remove Method (GanttItems Collection), Sort Method (GanttItems Collection)