10524 : Does the phGantXControl OCX support UNICODE?

Question

Does the phGantXControl OCX support UNICODE?

I use the method SetGridCellString passing a unicode string, but I see only question marks.

Answer

Yes the phGantTimePackage fully handles UNICODE characters. You will need fonts on your machine to represent the data you are trying to show.

Test it like this. Go to www.google.jp (japan), if you have the japan fonts you see soma japanese text, if you do not have the fonts you will see squares (or garbarge). If you see kanji text Copy it, and paste it in to the Grid. You should find that the grid keeps the kanji letters just like it should.

10688 : Critical path

Question

Does the phGantTimePackage and GTP.NET calculate the Critical Path?

Answer

WikiPedia on Critical path:

“The Critical Path Method, abbreviated CPM, is a mathematically based algorithm for scheduling a set of project activities. It is a very important tool for effective project management. It was developed in the 1950’s in a joint venture between DuPont Corporation and Remington Rand Corporation for managing plant maintenance projects. Today, it is commonly used with all forms of projects, including construction, software development, research projects, product development, engineering, plant maintenance, among others. Any project with interdependent activities can apply this method of scheduling.

The essential technique for using CPM is to construct a model of the project that includes the following:

A list of all activities required to complete the project,
The time (duration) that each activity will take to completion, and
The dependencies between the activities.
Using these values, CPM calculates the starting and ending times for each activity, determines which activities are critical to the completion of a project (called the critical path), and reveals those activities with “float time” (are less critical). In project management, a critical path is the sequence of project network activities with the longest overall duration, determining the shortest time possible to complete the project. Any delay of an activity on the critical path directly impacts the planned project completion date (i.e. there is no float on the critical path). A project can have several, parallel critical paths. An additional parallel path through the network with the total durations shorter than the critical path is called a sub-critical or non-critical path.”

Our components are used in many different types of applications and even when they are used for strict project planning it is common that multiple types of time items are used that symbolize different aspects of time. Planned time is only one aspect. Work time can be another (the actual performed work amount). And scheduled time can be a third (when the resource is available for any work at all).

So to simply say that we support a Critical Path analysis would not be correct. We do however support the harbouring of all the information needed to perform Critical Path calculations in what ever application you may build and this is what is important to us.

Critical Path calculation is to us only another domain specific usage of the information presented by the GTP.NET and the phGantTimePackage. You can easily go from one TimeItem to another over its timeItemLinks (relations) and you can easily add logic to iterate these paths and perform actions (like actually moving overlapping timeItems etc) or present bottlenecks by changing the presentation any way you may require (color, form and content).

 

10484 : How can I iterate trough all the rows of the grid and gantt rows then save them to a database and later on read them in again. VCL

Question

I just received my legal copy of phgant vcl component. I am missing a serious help file.

How can I iterate trough all the rows of the grid en gantt rows en save them to a database and later on read them in again. I know how to use the database component but I don’t see a way to iterate through all the items An small exemple for delphi vcl please

Answer

We are sadly aware of the poor state of the help file; we have been a bit surprised by the recent revival of the phGantTimePackage for VCL. Of course we will make up for it by answering all question swiftly;

One possible way to bridge the gap between the ActiveX help file and knowledgebase and the VCL version is to look at the “glue” files that wrap the VCL version to create the ActiveX.
You can then directly see what internal VCL calls that are made to get a certain ActiveX call. Email support if you want access to these pas files

This code iterates the complete Gantt (instanse called G1)


procedure TForm1.ButtonIterateClick(Sender: TObject);

  procedure IterateCellsInANode(aGridRow:TAxisContentItem);
  var
    x:integer;
  begin
    for x:=0 to G1.Grid.CellCountX-1 do
    begin
      G1.Grid.GetText(G1.Grid.Cell[x,aGridRow.ListIndex]);
    end;
  end;

  procedure IterateGanttRowContent(aGantRow:TGantRow);
  var
    i,ii:integer;
    aTimeItem:TphDataEntity_GantTime;
  begin
    // Iterate layers
    for i:=0 to aGantRow.DataLists.Count-1 do
    begin
      // for each layer iterate time items
      for ii:=0 to aGantRow.DataLists.Items[i].Count-1 do
      begin
        aTimeItem:=aGantRow.DataLists.Items[i].Items[ii] as TphDataEntity_GantTime;
        aTimeItem.Start:=aTimeItem.Start+1; // Just change something so that we see that we have been here
        aTimeItem.Stop:=aTimeItem.Stop+1;
      end;

    end;
  end;

  procedure IterateNode(aNode:TphDataEntity_GridTreeNode);
  var
    i:integer;
  begin
    // Iterate sub nodes of this node
    for i:=0 to aNode.SubDataList.Count-1 do
    begin
      IterateNode(aNode.SubDataList[i] as TphDataEntity_GridTreeNode);
    end;
    IterateCellsInANode(aNode.AxisContentItem);
    IterateGanttRowContent(G1.RowList.FindRowFromGridNode(aNode));
  end;


var
  i:integer;
begin
  // Iterate root nodes from the grid tree
  for i:=0 to G1.Grid.GetTree.RootDataEntities.Count-1 do
  begin
    IterateNode(G1.Grid.GetTree.RootDataEntities[i] as TphDataEntity_GridTreeNode);
  end;
  G1.GA.Invalidate; // Invalidate the Gantt area to show changes

end;

10344 : Autoscroll when moving time items

Question

I Use phGantXControl.ocx 2.5.1.31 With Delphi

when time Item move to left most of the Gantt Area, Gantt Area scrolls left but when time item move to right most or top most or bottom most gantt area does not scrolls to these directions.

Answer

The ability to scroll up and down was added in a late 3.x version. You can upgrade your license to gain access to this function (and many other developments).

10495 : Selecting a link

Question

How can I find the Link between two phDataEntity_GantTime?
I want to use mouse double click the Link in GA, and then I can get the Link Object,but now I got nothing,how can I get it.

I found a example on plexityHide’s site,but I can’t open it ,please help me ,thanks!

Answer

The links in phGantTimePackage are not selectable in the current release. The links in GTP.NET are selectable.

The workaround that is commonly used in phGantTimePackage is to select a time item and produce a context menu containing the links that start or end in this time item, and have the user choose in this menu instead.
If you were to use owner drawn links you would have full control over how the links are drawn and can then catch a click to see if it is on such a link.

Selectable links is a candidate for version 4 of the product (no date set yet). Sorry for the bad news.

10304 : Underline from code in phGantX

Question

I cannot set an item to be underlined from code. ( I am trying to use the underline to indicate which item is being dragged over on a drag drop operation).  Here is my code:< ?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />

Answer

  When you use the grid you must use the CellLayouts to control the cell appearance. If you declare two cellLayouts, one to look normal, and one to look underlined, you can change the layout on a given cell with the IphGantX3.SetGridCellLayoutPropIndex call…

10302 : I need to know the rownumber of the created row to fill the gridcells?

Question

I am using your Gant Time Package with grid under VFP9.

When i’m adding a new row with Thisform.phGantX1.AddDataEntityTree(de) i need to know the rownumber of the created row to fill the gridcells with Thisform.phGantX1.gridcellValueSet(x,row,”test”,0)…

How can I do it?

Answer

On the IphDataEntity_Tree2 interface there is a property called GridRowIndex. Go like this:

Dim tn As IphDataEntity_Tree2

  Set tn = Thisform.phGantX1.AddDataEntityTree(de)

  phGantX1.GridCellValueSet 2, tn.GridRowIndex, “v1”, -1

 

10663 : Customize the grid rows with image or color.

Question

I’d like to know if it is possible, using ActiveX version, to customize the grid rows with image or color.

Answer

Each cell can be assigned its own CellLayout (IphGridLayoutPropX). In this object you can set properties as BackColor (and font, frame and align options ).

It is currently only possible to assign an image to a Cell when it shows the tree expand/collapse buttons. The image is then controlled with the properties IphDataEntity_Tree2.ImageIndex and IphDataEntity_Tree2.SelectedIndex.

10297 : I want to a time Gantt block with a simple text:”ABC” and .style=tsPipe. If set the text, the style desappear?

Question

I am using VB6 with your phgantTime.ocx.
I want to  a time Gantt block with a simple text:”ABC” and .style=tsPipe.
If set the text, the style desappear. DO you have a solution?

Answer

The text was drawn with a solid brush. In the latest patch download the text is drawn with a clear brush. Hence it will work with the newest version