10634 : How I can remove all schematime from a phschema?

Question

How I can remove all schematimes from a phschema? It is not sufficient to remove column from phschema, the schematime remain in memory of the schemaTime.

Answer

Correct. You will need to call IphSchemaX3.RemoveSchemaTime on each time item.

To access them all you must iterate over the IphSchemaX3.Layers collection and for each Layer you iterate all phDataEntity. Remeber to iterate backwards if you are about about to Detele the time items (the list will shrink when a time item is removed)

10496 : Versions of phGantTimePackage

Question

I just purchased and installed the COM edition of the GantTime package, and i do not really understand the versionning.

It was supposed to be version 3.2.1, but the installer just speaks about 3.0.

I found a patch on your site, but should i just replace the OCX in program files/plexityhide.com directory ?

And then, how can i know which version is in use under visual studio 2005 projects ? Because the version that is displayed in the references files “AxphGantXControl” and “phGantXControl” is “2.5.0.0” .

Please help me.

Answer

The first number (currently 3 for phGantTimePackage) is the major version and we usually ask for an update fee when this changes.

The second number shows new releases normally introducing some new functionality.

The third number is increased for bug fixes. Currently the install package has a fully functional version, but the patch available here https://plexityhide.com/pub/phGantXControl.zip contains more functionality and also has bug fixes.

You should download the latest patch.
You can simply replace your ocx with the new one.
If you put the new one in a new location you must register it with Regsvr32.exe <theocx> (standard com).

Your registration with us; that you have a license, will not be lost by this operation.

The version of your ocx can always be checked by finding the ocx in the explorer, choose properties, and click the version tab. The number displayed will be the correct version number for that ocx.

The version number 2.5 you see in VS2005 is the version of the typelibrary. The typelibrary is not given new version numbers when we extend it. If we make larger changes to the structure of the component so that the type library will not be backwards compatible its version will be updated (not in our current plans).

 

10499 : Virtual load in phGantTimePackage

Question

I’m trying to figure out the virtual load stuff. I saw the word doc “virtualload.doc”, and the sample event was helpfull… however it never fires. I assume I need to tell the grid I have 50 rows, and then it’ll fire the event 50 times, once for each row?

You make mention of a function “AddUnloaded(x)”, but I cannot find it anywere. How do I use it?

And one last question. If I add a root node in a normal fasion, can I use virtual load to load its children? Do I have to know up front how many children it will have?

Answer

The methods to call in the ActiveX version is IphGantX3.GridAddUnloaded(50) and then IphGantX3.OnVirtualLoadGrid will get called for each row that needs to be put on screen.

And then IphGantX3.OnVirtualUnLoadGrid will get called whenever a row does not show anymore.

10489 : Moving successor time items

Question

When a user changes or moves a task in the Gantt area all its successors (and the successors successors) must move with the same time value. How do I do this in VB6?

Answer

In the phGantTimePackage you need to move all the successors yourself. There is no built in function that does this.

One solution is to build a function that moves all time items on a GanttRow a certain amount of time and also calls itself recursivly for all its child nodes. And call this method in the IphGantX3.OnValueChangedGantTime event.

For a sample of doing complete iteration of the object model of the phGantt please see this article: Iteration

10438 : Transparent time item texts

Question

I use the OnUserDrawTime to draw the Rectangles and Frames like you described in http://plexityhide.dyndns.org/InstantKB13/article.aspx?id=10065. My problem is, that I have to add a text by TimeItemsTextAdd and TimeItemsTextSet. When I use this my rectangles are away. How can I set a text into the TimeItem with a transparent background? Or do I have to draw the text by API myself?

Answer

The fact that the time item texts was not transparent was a recently discovered bug that is fixed in the latest patch download https://plexityhide.com/pub/phGantXControl.zip

10470 : How to make a non visible Node in the grid visible?

Question

How to make a non visible Node in the grid visible?

TreeNode.Selected := true;
TreeNode.Visible := true;
phGant.Grid.FocusedCell := phGant.Grid.Cell[ 0, TreeNode.AxisContentItem.ItemIndex ];
phGant.Grid.FocusedCell.Selected := true;
phGant.Grid.MakeSureFocusedIsVisible;

This Code selects the Node but it does not make it visible.

Answer

The code should make a Node that is scrolled out of view visible (by scrolling it into view)…
Maybe this node is a non Expanded parent?

TreeNode.ParentNode.Expanded=true should fix that (unless that node also is in collapsed parent)

If this does not fix the problem you better send us a repeating sample so that we may debug and see what fails.

10431 : Accessing default drawing styles in userdraw

Question

we have to use the userstyle for the timeitems because we have to draw the rects ourself. We want to use the Pipe-Style ( in the newest version it is Style 8 for the timeitem ) Is there a way to draw the Rectangle with the pipe style with api functions?

Or is there a way in the newest version to specify two rectangles for one timeitem?

Answer

Currently it is not possible to access the default drawing styles in the OnUserDrawTime event. We do recognise this as desired functionality and this is possible in GTP.NET. We will put it on our list for phGantTimePackage.

10448 : I have phGantTimePackage,how to clear tree?

Question

I have phGantTimePackage, and I use TPhGant to show the planning of a day. In my form I have a refresh button who re-select in the database and add row in the Gantt.

My problem is that I need to clear the gantt before refresh it.

How can I do it.

Answer

In the activeX version call IphGantX3.ClearTree

In VCL

  if UseGridNotTree then
  begin
    Grid.GetTree.RootDataEntities.Clear;
  end                  
  else
    TreeView.Clear;

10417 : Is there any way to control the scale divisions?

Question

I am evaluating the phGantTimePackage for use in our Access application.
Is there any way to control the scale divisions?   The short scale appears to show in weeks in the scale value range 0.47 down to 0.067.  We want to force it to stay in weeks below this level.
The onScalerStringShort event will compile in Access VBA only if theStep parameter is declared as ByVal, hence it is not possible to change theStep within the procedure.

Answer

If you want to limit the scaling you can implement the OnLimitScaling. If you want to control how and when the DateScaler decides on a mode switch you can experiment with the IphGantX3.PixelsForModeSwitch property. It controls how few pixels a big intervall can contain before it is time for a mode switch (this is pretty advanced and probably pretty hard to get right)

 

10412 : How do I add output text for a timebar

Question

How do i output text for a timebar, positioned to the right of the bar (or on the bar) on the calendar area of the control?  I am using the code below to add timebars:

*— add the bar to the calendar 
tTime=ThisForm.Gant1.AddGantTime(nChildTask,0)
tTime.start = cTasks.taskbeg
tTime.stop =  cTasks.taskend
tTime.CanEdit = .t.
tTime.UserIntegerReference = 1
IF cTasks.InOffice
   tTime.color = RGB(128,255,255)
ELSE
   tTime.color = RGB(0,255,64)
ENDIF

Do i use tTime.TimeItemsTextSet(1,”test”,10,10,1) or do i use “TimeItemsTextAdd”, or a combination of the two?

Answer

Yes you first call TimeItemsTextAdd to create a placeholder and then use that placeholder (they will be indexed 0,1,2…)

TimeItemsTextSet(0,”test”,X,Y,FontIndex(0..2 that maps to IphGantX3.TimeItemTextFont1…TimeItemTextFont3))