10485 : I set the style property to tsUser but the OnUserDrawTime Event does never fired?

Question

How can i draw a brushed item in phSchemaX1? I set the style property to tsUser but the OnUserDrawTime Event does never fired?

Answer

This should not be a problem, and you are doing the right thing setting the tsUser… The only known explenation to this is if you are in FoxPro; check the issues described in this article http://plexityhide.dyndns.org/InstantKB13/Article.aspx?id=10193

If you are not in FoxPro you should send us a repeating sample.TIA

10254 : Setting top row in phGantTimePackage VCL

Question

Using the VCL-version of the ganttview how can I make a row of the gantt the toprow ? Or: why does the MakeSureRowInView (in the way like shown in the example below) not work ? Do additional properties to be set ?

_gantrow := phgant1.RowList.Rows[20];

phgant1.MakeSureRowInView(_gantrow);

Answer

If you are using the Grid option you can control the TopLeftCell like this
    Gantt.Grid.TopLeftCell…

Using the tree you go like this:
    Gantt.TreeView.TopItem…

The MakeSureRowInView(theGantRow:TGantRow) looks for time items on this row and changes the time settings so that they show.

10236 : Time item will not change row?

Question
Hello,
 
Can you tell me..is it possible for the Gant Times to visually move to a different Gant Row when dropped?  I set the option for the tree.CanChangeRows to true which allows for dragging the GantTime to a new row but when I let go of the block, nothing happens — it doesn’t move to the new Row where dropped or change in time.  (If I just drag to a different time then it moves to the new time fine.) 
 
I’m using the ActiveX version.
 
Thanks for any help you can offer!
 
Answer
Yes, but you must implement the IphGantX3.OnGantTimeChangeRow event to that is fired when the user drops a time item on another row.
 
Like this in VB6:
Private Sub phGantX1_OnGantTimeChangeRow(ByVal theGant As phGantXControl.IphGantX, ByVal theDataEntity As phGantXControl.IphDataEntity_GantTime, ByVal theOldRow As phGantXControl.IGantRow, ByVal theNewRow As phGantXControl.IGantRow)
Dim aList As IphDataList
    Set aList = theNewRow.DataLists.DataList(0)
    
    theDataEntity.ChangeOwner aList, 0
End Sub

10244 : What events are triggered on Drag drop

Question

I am developing a Microsoft Access program (VBA/DAO). Have inserted the phGantX object on a form. The tree object displays names of scheduled events. Rows on the Gantt object display an icon for the specific day the event occurs. When I drag and drop the icon on the Gantt object, I would like to update the database with the new date. What events are triggered when I click on/drag/drop the icon on the Gantt object. I have tried multiple ways and can’t figure it out. Please help.

Answer

When you drag something in Access to the Gantt the events that come into play are these:
IphGantX3.OnOLEDrop
IphGantX3.OnOLEDragOver
IphGantX3.OnOLEDragLeave
IphGantX3.OnOLEDragEnter

You need to translate the DD-coordinates to local before you send them in to any Gantt specific function.

10215 : Does the phGantX have its own mouse pointer property?

Question

Mouse pointer: does the Gantt have its own mouse pointer property e.g. IphGantX3.MousePointer = VBHourGlass?

Answer

In phGantTimePackage we call the mouse pointer for Cursor. These are the properties that you can use to set and get the Cursor on particular sub components in the phGantX:

DragCursorTree ; both tree and grid
CursorTree ; both tree and grid
Cursor ; same as Cursor tree
CursorScaler
CursorGantArea

All properties takes an int, that maps to the standard cursor in the system, you can create new cursors and add their handles with this method in phGantX:

AddCursor(aCursorHandle: Integer; aIndex: Integer)

10246 : 24 hour period and vertically 7 days with no date involved

Question

Basically I need to show horizontally a 24 hour period and vertically 7 days with no date involved. How?

Answer

It sure sounds like you want to use the phSchemaX component. This component can be viewed vertically, looking like a schedule or viewed horizontally looking more like the Gantt. Simply set the property FlipView to true or false.

You add columns, one for each day of the week and for each column you set the IphDataEntity_SchemaColumn.OffsetDate…

So if you choose to start from time zero (1899), Monday OffsetDate=0, Tuesday OffsetDate=1 etc…

You then set the ScalerStart and ScalerStop datetimes of the phSchema to show only a day.

10207 : How do I apply my custom sort on particular column?

Question

I am using registered copy of phGantXControl.ocx v3.5.4.67 ActiveX control in my MFC application. How do I apply my custom sort on particular column?

Answer

Currently we have no event to handle custom sort from the ActiveX Version. You might think that this is an oversight and that we should have such an event… And I kind of agree, but we do not. Contact support@plexityhidemainsite.azurewebsites.net , we can extend the current product.

Update from support: A new event has been added to handle custom sort. It is available in the latest service release…

10202 : I just need to know how I identify which time items are owned by a column and then how to them.

Question

I just need to know how I identify which time items are owned by a column and then how to delete them.

Answer

For i = 0 To phSchemaX1.Layers.Count – 1
  Set layer = phSchemaX1.Layers.DataList(i)
  For ii = layer.Count – 1 To 0 step by -1 ‘ Since I am removing items I must step backwards in order to avoid messing up indices
    Set aSchemaTime = layer.Items(ii)
    IF aSchemaTime.Col=aColumnIndexThatIWantToRemoveAllTimesFrom then
      phSchemaX1.RemoveSchemaTime(aSchemaTime)
    end if
  Next ii
Next i

10200 : OnSchemaHitInfo event

Question

Is it at least possible to get the text and the Index of the column on which the nodes are added in the OnSchemaHitInfo event.

Answer

Private Sub ganCapacity_OnSchemaHintInfo(ByVal sender As Object, ByVal e
 As
AxphGantXControl.IphSchemaXEvents_OnSchemaHintInfoEvent) Handles
ganCapacity.OnSchemaHintInfo
  Debug.WriteLine(e.theStart.ToString())

  ‘ Like this; I have not compiled it so please excuse any typos…
  if not (e.theObject is nothing) then
    dim col as IphDataEntity_SchemaTime
    set col=phSchemaX.Columns.Items(e.theObject.Col)
    Debug.WriteLine(col.Text)
  end if
End Sub

10197 : I want the height”s of all the rows to change

Question

If I change the height of one row (may be the 1st one or maybe I select all
rows and the increase the height) I want the height’s of all the rows to
get changed accordingly. How do I do this one.

Answer

You will have to iterate all rows and set the height to each one.
This code doubles the row height on the selected row:
if phGantX1.CurrentDataEntityTree<>nil then
begin
  y:=(phGantX1.CurrentDataEntityTree as IphDataEntity_Tree2).GridRowIndex;
  phGantX1.SetRowHeightGrid(y,phGantX1.GetRowHeightGrid(y)*2);
end;