Sub OnUserInteractiveSelectionChange(Sender: Object; Args: ITabUserInteractiveSelectionChangeEventArgs);
Begin
//set of operators;
End Sub OnUserInteractiveSelectionChange;
Sub OnUserInteractiveSelectionChange(Sender: System.Object; Args: Prognoz.Platform.Interop.Tab.TabUserInteractiveSelectionChangeEventArgs);
Begin
//set of operators;
End Sub OnUserInteractiveSelectionChange;
Sender. Parameter returning the component that has generated the event.
Args. Parameter allowing 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.
The requirements and result of the Fore.NET Example execution match with those in the Fore Example. Use Fore.NET analogs instead of Fore components.
Imports Prognoz.Platform.Interop.Drawing;
Imports Prognoz.Platform.Interop.Tab;
Private Sub tabSheetBoxNet1_OnUserInteractiveSelectionChange(Sender: System.Object; Args: Prognoz.Platform.Interop.Tab.TabUserInteractiveSelectionChangeEventArgs);
Var
IntSelection: ITabUserInteractiveSelection;
Begin
IntSelection := Args.Selection;
text := IntSelection.Range.Right.ToString();
If IntSelection.Range.Right > 10 Then
Args.Cancel := True;
End If;
End Sub;
See also: