Gantt Chart Key Property
Date:4/21/2009 4:31:24 AM
Product:ActiveGanttVB Scheduler Component
Framework:Visual Studio 6.0
User's Development Environment:XBase++
Subject:Key Problem

I have a problem:

    ActiveGanttVBCtl1:Columns:Item("1"):Caption = "ID"
    ActiveGanttVBCtl1:Columns:Item("1"):Width = 25
    ActiveGanttVBCtl1:Columns:Item("1"):StyleIndex = "Columns"

this works, but according to help the following should be possible too:

    ActiveGanttVBCtl1:Columns:Add("ID", "1", 25, "Columns")

with this code an error occurs: "50000: Numeirc or duplicate Column object key"

What's wrong?



If you try the following code the error you specified above will be launched:

     ActiveGanttVBCtl1.Columns.Add "", "Col1"
     ActiveGanttVBCtl1.Columns.Add "", "Col1"

Because the Key is duplicated. If using Keys use a different key for each object:

     ActiveGanttVBCtl1.Columns.Add "", "Col1"
     ActiveGanttVBCtl1.Columns.Add "", "Col2"


All trademarks are property of their respective holders, and are only used to directly describe the products and services being provided. Their use in no way indicates any relationship or endorsement between The Source Code Store LLC and the holders of said trademarks.