Type | Description | |||
Item as Variant | A long expression that indicates the handle of the item where a cell is being divided, or 0. If the Item parameter is 0, the ColIndex parameter must indicate the handle of the cell. | |||
ColIndex as Variant | A long expression that indicates the index of the column where a cell is divided, or a long expression that indicates the handle of the cell being divided, if the Item parameter is missing or it is zero. | |||
Variant | A long expression that indicates the handle of the cell being created. |
( "Merge" means multiple cells in a single cell, "Split" means multiple cells inside a single cell )
The following VB sample splits a single cell in two cells ( Before running the following sample, please make sure that your control contains columns, and at least an item ):
With Gantt1.Items Dim h As HITEM, f As HCELL h = .FirstVisibleItem f = .SplitCell(h, 0) .CellCaption(, f) = "inner cell" End With
The following C++ sample splits the first visible cell in two cells:
#include "Items.h" CItems items = m_gantt.GetItems(); COleVariant vtMissing; V_VT( &vtMissing ) = VT_ERROR; COleVariant vtSplit = items.GetSplitCell( COleVariant( items.GetFirstVisibleItem() ), COleVariant( long(0) ) ); items.SetCellCaption( vtMissing, vtSplit, COleVariant( "inner cell" ) );
The following VB.NET sample splits the first visible cell in two cells:
With AxGantt1.Items Dim i As Object i = .SplitCell(.FirstVisibleItem, 0) .CellCaption(Nothing, i) = "inner cell" End With
The following C# sample splits the first visible cell in two cells:
EXGANTTLib.Items items = axGantt1.Items; object i = items.get_SplitCell(items.FirstVisibleItem, 0); items.set_CellCaption(null, i, "inner cell");
The following VFP sample splits the first visible cell in two cells:
with thisform.Gantt1.Items local i i = .SplitCell(.FirstVisibleItem,0) local s, crlf crlf = chr(13) + chr(10) s = "Items" + crlf s = s + "{" + crlf s = s + "CellCaption(," + str(i) + ") = " + chr(34) + "inner cell" + chr(34) + crlf s = s + "}" thisform.Gantt1.Template = s endwith