![]() | Type | Description | ||
| Item as HITEM | A long expression that indicates the the handle of the item where the bar is removed. | |||
| Key as Variant | Optional. A String expression that indicates the key of the bar being accessed. If missing, the Key parameter is empty. If the Item has only a single Bar you may not use the Key parameter, else an unique key ( in the same bars of the item ) should be used. | |||
| Property as ItemBarPropertyEnum | An ItemBarPropertyEnum expression that indicates the property being accessed | |||
| Variant | A Variant expression that indicates the property's value. |
The following VB sample changes the end date for the bar in the first visible item ( in this sample we consider that AddBar method was used with the Key parameter as being empty ) :
With Gantt1.Items
.ItemBar(.FirstVisibleItem, "", exBarEnd) = "6/19/2005"
End With
The following C++ sample changes the end date for the bar in the first visible item:
CItems items = m_gantt.GetItems();
items.SetItemBar( items.GetFirstVisibleItem(), COleVariant(""), 2 /*exBarEnd*/, COleVariant("6/19/2005") );The following VB.NET sample changes the end date for the bar in the first visible item:
With AxGantt1.Items
.ItemBar(.FirstVisibleItem, "", EXGANTTLib.ItemBarPropertyEnum.exBarEnd) = "6/19/2005"
End WithThe following C# sample changes the end date for the bar in the first visible item:
axGantt1.Items.set_ItemBar(axGantt1.Items.FirstVisibleItem, "", EXGANTTLib.ItemBarPropertyEnum.exBarEnd, "6/19/2005");
The following VFP sample changes the end date for the bar in the first visible item:
with thisform.Gantt1.Items
.DefaultItem = .FirstVisibleItem
local sT, vfpCRLF
vfpCRLF = chr(13)+chr(10)
sT = "Items" + vfpCRLF
sT = sT + "{"+ vfpCRLF
sT = sT + "ItemBar(DefaultItem," + chr(34) + chr(34) + ",2) = " + chr(34) + "20/07/2005" + chr(34) + vfpCRLF
sT = sT + "}"+ vfpCRLF
thisform.Gantt1.Template = sT
endwithThe VFP sample uses the Template property in order to execute the ItemBar property. The sample builds the script:
Items
{
ItemBar(DefaultItem,"",2) = "20/07/2005"
}
This way the ItemBar property for the default item is invoked.