Thursday, July 22, 2010Collision detect of TimeItems in a Gantt chartThe GTP.NET will order the colliding time items in separate sub columns. The way this is done is fully automatic and the result will be something like this: But what if you would rather to have the Top time item at the bottom? One way is to re-order the SubColumn values after the collision detection is done. Go like this: 1: Private _CollisionDetectNeedUpdate As Boolean 2: 3: Private Sub OnCollionsDetect(ByVal aGantt As PlexityHide.GTP.Gantt, 4: ByVal e As PlexityHide.GTP.CollisionDetectEventArgs) 5: _CollisionDetectNeedUpdate = True 6: End Sub 7: 8: Private Sub Gantt1_OnTimeItemAreaPaintBackground(ByVal aOffscreenDraw As 9: PlexityHide.GTP.OffscreenDraw, ByVal e As PlexityHide.GTP.OffscreenDrawArgs) 10: Handles Gantt1.OnTimeItemAreaPaintBackground 11: If (_CollisionDetectNeedUpdate And 12: Gantt1.Grid.RootNodes.Count > 0 And Gantt1.MouseMoveKind = MouseMoveKind.none) Then 13: Dim gr As GanttRow = Gantt.GanttRowFromGridNode(Gantt1.Grid.RootNodes(0)) 14: 15: For i = 0 To gr.Layers(0).Count - 1 16: gr.Layers(0).Item(i).SubCol = 1 + gr.SubColumnsFromCollisionDetect - 17: gr.Layers(0).Item(i).SubCol 18: Next 19: _CollisionDetectNeedUpdate = False 20: End If 21: 22: End Sub And then you have a result that looks like this:
Comments:
such an amazing content.
Pediatric hospital in jaipur Orthopedic hospital in jaipur Kidney hospital in jaipur Neurology hospital in jaipur pulmonology hospital in jaipur Respiratory Hospital in Jaipur Heart Hospital in Jaipur urology hospital in jaipur ent hospital in jaipur Cancer hospital in Jaipur covid 19 hospital jaipur Best Hospital in Jaipur Multispeciality hospital in jaipur Subscribe to Post Comments [Atom] << Home Subscribe to Posts [Atom] |
|

Post a Comment