10359 : onDblClick Event in phSchema

…the info about clicked column and time: var   aphSchemaTime:TphDataEntity_SchemaTime; begin   if phSchema1.MouseDownColumn<>nil then   begin     aphSchemaTime:=phSchema1.AddSchemaTime(0);     aphSchemaTime.Start:=phSchema1.MouseDownDateTime-1;     aphSchemaTime.Stop:=phSchema1.MouseDownDateTime-1;     aphSchemaTime.Col:=phSchema1.MouseDownColumn.ListIndex;     aphSchemaTime.BackColor:=Random(65000);   end;  … Continue reading

10343 : Questions on Grid color and iterations

…phGantXControl.IphDataList2lev aList2Lev=axphGantX1.DataList3levGantTimes().get_DataList2Lev(i);     for(int ii=0;ii<aList2Lev.Count();ii++)     {       phGantXControl.IphDataList aList=aList2Lev.get_DataList(ii);       for(int iii=0;iii<aList.Count();iii++)       {         phGantXControl.IphDataEntity_GantTime2 aGantTime=aList.get_Items(iii) as phGantXControl.IphDataEntity_GantTime2;         aGantTime.Start=aGantTime.Start.AddDays(1);         aGantTime.Stop=aGantTime.Stop.AddDays(1);       }     }   }… Continue reading

10571 : Time items with a color gradient?

…gradient? Answer In GTP.NET you can set the TimeItemLayout this way: ti1.TimeItemLayout=new TimeItemLayout(); ti1.TimeItemLayout.BrushKind=BrushKind.GradientDiagonal; ti1.TimeItemLayout.Color=Color.YellowGreen; ti1.TimeItemLayout.GradientColor=Color.Yellow; In phGantTimePackage you can get a gradient effect doing like this: time.Style = txTimeStyle.tsPipe;… Continue reading

10320 : How can I iterate over my rows’ entities? VCL D7

…over all time items                           Set ti = phGantX1.RowList.GantRow(i).DataLists.DataList(ii).Items(iii)                                 ti.Start = ti.Start + 1                 ti.Stop = ti.Stop + 1             Next iii         Next ii     Next i… Continue reading

10305 : How can I iterate through all loaded RootDataEntities? ( Only the loaded ones) (VCL version)

…more precise: for i:=0 to phGant2.Grid.MainGrid.AxisContentListY.LoadedCount-1 do begin   if phGant2.Grid.AxisContentItemToGridTreeNode(phGant2.Grid.MainGrid.AxisContentListY.Loaded[i]).Level=0 then   begin     If phGant2.Grid.Cell[0,phGant2.Grid.MainGrid.AxisContentListY.Loaded[i].ListIndex].Selected then        // Do Stuff here        // e.g. phGant2.Grid.AxisContentItemToGridTreeNode(phGant2.Grid.MainGrid.AxisContentListY.Loaded[i]).Userreference….   end; end;… Continue reading

10243 : Printing in VCL

…do this ???’);   //Answer#   Printer.BeginDoc;   Printer.Handle;   TphPrintGantt.PrintWithGrid(G1,Printer.Handle,10,10,2,2,G1.TreeWidth,nil,-1,true,g1.Start,g1.Stop,g1.Width-g1.TreeWidth,g1.ScalerHeight,usedwidth,usedHeight,0,0,nil);   Printer.EndDoc; end; and also has this in the OnPrintToHdcNewPage event: procedure TForm1.G1PrintToHdcNewPage(theGant: TphGant_ComBasic;   aPageNo: Integer; var pageHeight, pageWidht:… Continue reading