![]() | Type | Description | ||
| Item as HITEM | A long expression that specifies the item that hosts the bar being moved or resized. | |||
| Key as Variant | A VARIANT expression that specifies the bar being moved or resized. |
The following VB sample moves the bar in a second gantt control once the user resizes or moves a bar in the first gantt control:
Private Sub G2antt1_BarResizing(ByVal Item As EXG2ANTTLibCtl.HITEM, ByVal Key As Variant)
With G2antt2
.BeginUpdate
.Items.AddBar .Items.ItemByIndex(G2antt1.Items.ItemToIndex(Item)), G2antt1.Items.ItemBar(Item, Key, exBarName), G2antt1.Items.ItemBar(Item, Key, exBarStart), G2antt1.Items.ItemBar(Item, Key, exBarEnd)
.EndUpdate
End With
End Sub
The sample uses the AddBar method instead ItemBar, so the start and end points of the bar are updated once.