ITabCellIterator.CurrentCell

Syntax

CurrentCell: ITabRange;

Description

The CurrentCell property returns the cell that currently contains the iterator.

Example

To execute the example, create a form given in the example for the ITabCellIterator.Next method. Add the Button3 and Button4 buttons and the EditBox component with the EditBox1 name to the form.

Add the event handler of the Button3 and Button4 buttons:
Sub Button1OnClick(Sender: Object; Args: IMouseEventArgs);
    Begin

        iter.First;
    End Sub Button1OnClick;
Sub Button2OnClick(Sender: Object; Args: IMouseEventArgs);
Begin
    EditBox1.Text:= "Row:" + iter.CurrentRow.ToString + ", Col:" + iter.CurrentColumn.ToString;
    iter.CurrentCell.Value:= "Cell"+ iter.CurrentCell.Address;
End Sub Button2OnClick;

Execute an example. Enter values to the random cells in the table. Create iterator by selecting the table range and clicking the Button1 button, created in the example for the ITabCellIterator.Next. Click the Button3 button (in the given example the button with the First text): moving to the first element is executed. Click the Button4 button (in the given example this is the Current Cell button): the text with Row:-1, Col:-1 that are the row and column indexes of the first iterator cell is displayed in the EditBox component.

Move to the next iterator element using the Button2 button, created in the example for the ITabCellIterator.Next. Click the Button4 button: the value of the cell is changed to the Cell <cell address>, the Row:-<row index>, Col: <column index> is displayed in the EditBox component:

See also:

ITabCellIterator