TabSheetBox.OnBeforeCellChange

Syntax

Sub TabSheetBoxOnBeforeCellChange(Sender: Object; Args: ITabCellBeforeChangeEventArgs);

Begin

//set of operators

End Sub TabSheetBoxOnBeforeCellChange;

Parameters

Sender - a parameter, indicating the component, in which the event has occurred.

Args - a parameter, which allows to define the cell, in which the event has occurred.

Description

The OnBeforeCellChange event occurs before changing a table cell value.

Example

To execute the example, the procedure has to be set as an event handler to the OnBeforeCellChange event for the TabSheetBox component named TabSheetBox1.

Sub TabSheetBox1OnBeforeCellChange(Sender: Object; Args: ITabCellBeforeChangeEventArgs);

Var

New_val, Old_val: Variant;

Begin

Old_val := Args.TabSheet.Source.GetTabSheet.CellValue(Args.Row, Args.Column);

New_val := Args.Value;

End Sub TabSheetBox1OnBeforeCellChange;

As a result the variable "Old_val" will contain the old value of the cell, and the variable "New_val" - the new value, which will be placed in the cell after event handling.

See also:

TabSheetBox