ITabCellIterator.CurrentCell

Fore Syntax

CurrentCell: ITabRange;

Fore.NET Syntax

CurrentCell: Prognoz.Platform.Interop.Tab.ITabRange;

Description

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

Fore Example

To execute an example create a form, given in the Fore 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:

Fore.NET Example

To execute an example create a form, given in the Fore.NET Example for the ITabCellIterator.Next method. Add the Button3 and Button4 buttons and the TextBox component with the TextBox1 name to the form.

Add the event handler of the Button3 and Button4 buttons:
Private Sub button1_Click(sender: System.Object; e: System.EventArgs);
    Begin
        iter.First();
    End Sub;
Private Sub button2_Click(sender: System.Object; e: System.EventArgs);
    Begin
        iter.CurrentCell.Value:= "Cell"+ iter.CurrentCell.Address;
        TextBox1.Text:=  "Row:" + iter.CurrentRow.ToString + ", Col:" + iter.CurrentColumn.ToString;
    End Sub;

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 this is 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 TextBox 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 TextBox component:

See also:

ITabCellIterator