Katalogerna
PlexityHide

Home 

Products 

Downloads 

Our Shop 

Support 

Contact 


phGantTimePackage FAQ 10648


How can you add a link from one time object to another on double click. Please note that this article refers to the phGantTimePackage
Jump to article- 2006-08-13 11:26:00 - Email plexityHide

Question

How can you add a link from one time object to another on double click.

I have tried using the code

Set alink = theGant.AddLink
If Not (theDataEntity Is Nothing) Then

   If alink.LinkOwner Is Nothing Then
    alink.LinkOwner = theDataEntity
  Else
    Set alink = phGantX1.AddLink
    alink.LinkedTo = theDataEntity 
  End If
End If

Answer

A link needs two time items. If you want to add a link as a result of a double click you will have one time item for sure. Namely the time item you double clicked on. But what about the other?

You can iterate thru the time items and find another selected time item (IphDataEntity_GantTime.Selected=true) or you can take the double click as the start for finding the other, by setting the component into a "link creating mode" and drag a link out to a new time item as described in this article.

The important thing to remember is to set two different time items in the link properties LinkOwner and LinkedTo, otherwise the link will not be drawn.

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

 

 

 


 

 

Google
WWW plexityHide phGantTimePackage FAQ
Support

Support intro

Knowledgebase

FAQ phGantTimePackage

FAQ GTP.NET

FAQ general

Testimonials

"This is too GREAT. I must say you have strong support and really good programmers at your place. Your entire team is good. Just Fantastic! – 100%"
Gaurav Patole,
WebTechDevelopers
More testimonials...