10522 : Dependencies between gantt items


Can we create dependencies between gantt items using MS Project method by draying a line from predecessor to successor in the gantt chart?


< ?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />


Set the property IphGantX3.StickyMode=smDependency and the next click on a
time item will draw an outline of a link with IphGantX3.DefaultLinkColor and IphGantX3.DefaultLinkStyle.

To actually create the link object you implement the OnDependencyAction event:

Private Sub phGantX1_OnDependencyAction(ByVal theGant As phGantXControl.IphGantX3, ByVal theStartDataEntity As phGantXControl.IphDataEntity_GantTime2, ByVal theTargetDataEntity As phGantXControl.IphDataEntity_GantTime2)

    Dim aLink As IphDataEntity_Link
    Set aLink = theGant.AddLink
    aLink.LinkOwner = theStartDataEntity
    aLink.LinkedTo = theTargetDataEntity
    aLink.LinkStyle = tlsMSProject   

End Sub



Leave a Reply