Sub OnUserInteractiveSelectionChange(Sender: Object; Args: ITabUserInteractiveSelectionChangeEventArgs);
Begin
//set of operators;
End Sub OnUserInteractiveSelectionChange;
Sender. The parameter that returns the component that generated the event.
Args. The parameter that enables the user to determine event parameters.
The OnUserInteractiveSelectionChange event occurs when interactive cell range is changed.
Event argument properties can be used to check interactive range settings, and if required, prohibit their change.
Executing the example requires a form, the TabSheetBox component named TabSheetBox1 on this form, and a data source for TabSheetBox1. Interactive ranges are created in the displayed table. The specified procedure is set as handler of the OnUserInteractiveSelectionChange event of the TabSheetBox1 component.
Sub TabSheetBox1OnUserInteractiveSelectionChange(Sender: Object; Args: ITabUserInteractiveSelectionChangeEventArgs);
Var
IntSelection: ITabUserInteractiveSelection;
Begin
IntSelection := Args.Selection;
If IntSelection.Range.Right > 10 Then
Args.Cancel := True;
End If;
End Sub TabSheetBox1OnUserInteractiveSelectionChange;
When the event occurs, right interactive range border is checked: if the border is moved far than the column 10, further change of the interactive range is prohibited.
See also: