![]() | Type | Description | ||
| Options as Variant | Reserved. By default, it is 0. |
![]() | Return | Description | ||
| Variant | A safe array that holds the items in the control. The safe array being returned has two dimensions. The first dimension holds the collection of columns, and the second holds the cells. |
The following VB sample gets the items from a control and put them to the second one:
With Gantt2
.BeginUpdate
.Columns.Clear
Dim c As EXGANTTLibCtl.Column
For Each c In Gantt1.Columns
.Columns.Add c.Caption
Next
.PutItems Gantt1.GetItems
.EndUpdate
End With
The following C++ sample gets the items from a control an put to the second one:
#include "Items.h" #include "Columns.h" #include "Column.h" m_gantt2.BeginUpdate(); CColumns columns = m_gantt.GetColumns(), columns2 = m_gantt2.GetColumns(); for ( long i = 0; i < columns.GetCount(); i++ ) columns2.Add( columns.GetItem( COleVariant( i ) ).GetCaption() ); COleVariant vtMissing; V_VT( &vtMissing ) = VT_ERROR; COleVariant vtItems = m_gantt.GetItems( vtMissing ); m_gantt2.PutItems( &vtItems, vtMissing ); m_gantt2.EndUpdate();
The following C# sample gets the items from a control and put them to a second one:
axGantt2.BeginUpdate();
for (int i = 0; i < axGantt1.Columns.Count; i++)
axGantt2.Columns.Add(axGantt1.Columns[i].Caption);
object vtItems = axGantt1.GetItems("");
axGantt2.PutItems(ref vtItems);
axGantt2.EndUpdate();
The following VB.NET sample gets the items from a control and put them to a second one:
With AxGantt2
.BeginUpdate()
Dim j As Integer
For j = 0 To AxGantt1.Columns.Count - 1
.Columns.Add(AxGantt1.Columns(j).Caption)
Next
Dim vtItems As Object
vtItems = AxGantt1.GetItems("")
.PutItems(vtItems)
.EndUpdate()
End With
The following VFP sample gets the items from a control and put them to a second one:
local i
with thisform.Gantt2
.BeginUpdate()
for i = 0 to thisform.Gantt1.Columns.Count - 1
.Columns.Add( thisform.Gantt1.Columns(i).Caption )
next
local array vtItems[1]
vtItems = thisform.Gantt1.GetItems("")
.PutItems( @vtItems )
.EndUpdate()
endwith