I have 3 questions. I am using the phGant control in VB.
1. I want to color the background several rows in the grid, I ‘m using 4 columns in treegrid, how can I do this?
2. How can I edit the text in a time item?
3. How can I iterate through the timetems in the RootDataEntitiesTree and change the start from the timeitems, timeitems on the second level are unchanged
Thank you very much in advance.
To set seperate background colors in the grid you need to assign GridLayoutproperties to the cells. To declare GridLayoutProperties you go like this:
phGantX1.GridLayoutPropSet 0, ColorConstants.vbYellow, ColorConstants.vbBlack, “Helvetica”, 8, 20, 20, False, True, False, True, False
phGantX1.GridLayoutPropSet 1, ColorConstants.vbRed, ColorConstants.vbBlack, “Helvetica”, 8, 20, 20, False, True, False, True, False
phGantX1.GridLayoutPropSet 2, ColorConstants.vbBlue, ColorConstants.vbWhite, “Helvetica”, 8, 20, 20, False, True, False, True, False
And to use them on a specific cell you go can use the IphGantX3.SetGridCellLayoutPropIndex method.
2. There is currently no support to edit time item texts. If you need to you can bring up a dialog with an edit box. your would then use IphDataEntity_GantTime2.TimeItemsTextSet to update the text with the new value.
3. To iterate thru time items you go like this: