Katalogerna
PlexityHide

Home 

Products 

Downloads 

Our Shop 

Support 

Contact 


phGantTimePackage FAQ 10552


How do I to control the links with delphi Please note that this article refers to the phGantTimePackage
Jump to article- 2006-05-07 09:32:00 - Email plexityHide

Question

How do I to control the links with the VCL version?

Answer

This is a code snippet showing how to enter the link create mode in Delphi. The link create mode (smDependency) allows the user to click one time item and drag out a link to another time item in order to create the depency link:

procedure TForm1.SpeedButtonLinkClick(Sender: TObject);
begin

  // Enter depenency create mode... Will stay in this mode until link created
  phGant1.StickyMode:=smDependency;
end;


procedure TForm1.phGant1DependencyAction(theFirst,
  theSecond: TphDataEntity_GantTime);
var
  aLink:TphDataEntity_Link;
begin

  // Leave the sticky mode
  phGant1.StickyMode:=smNone;

  aLink:=phGant1.AddLink;
  aLink.LinkOwner:=theFirst;
  aLink.LinkedTo:=theSecond;

  aLink.LinkStyle:=phGant1.DefaultLinkStyle;
  aLink.LinkColor:=phGant1.DefaultLinkColor;
  aLink.LinkPenWidth:=phGant1.DefaultLinkPenWidth;

end;

 

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...