Sub OnEditObject(Sender: Object; Args: IModelBoxEditObjectEventArgs);
Begin
//set of operators;
End Sub OnEditObject;
Sender. Parameter that returns the component that has generated the event.
Args. Parameter that returns the model that is being edited.
The OnEditObject event occurs on opening a model for edit.
Executing the example requires a form with two ModelBox components and two UiModel components. The component with the UiModel1 identifier is the data source for the component with the ModelBox1 identifier and UiModel2 is for ModelBox2. UiModel1 provides access to the model that is the system of non-linear equations.
The example is a handler of the OnEditObject event for the ModelBox1 component and is executed on pressing the Edit button or double-clicking on the equation on the Parameters panel of this component.
Sub ModelBox1OnEditObject(Sender: Object; Args: IModelBoxEditObjectEventArgs);
Begin
UiModel2.Object := Args.Object;
UiModel2.Active := True;
End Sub ModelBox1OnEditObject;
After executing the example the edited model is opened in the ModelBox2 component.
See also: