OnUpdateFormula(Sender: IMsExpressionEdit; Args: ITermEventArgs);
OnUpdateFormula(Sender: Prognoz.Platform.Interop.Ms.MsExpressionEdit;
Args: Prognoz.Platform.Interop.Forms.TermEventArgs);
Sender. Component that has generated the event.
Args. Event arguments.
The OnUpdateFormula event that occurs on converting the external presentation of expression to the internal one.
The OnUpdateFormula event is called for the literal terms, the formula and the text of which match. It enables the user to set the internal view to the external one.
The converting of external view of the term to the internal one occurs, for example, on entering or changing the text in the MsExpressionEdit component.
Executing the example requires a form and the MsExpressionEdit component with the MsExpressionEdit1 identifier.
The example is a handler of the OnUpdateFormula event for the MsExpressionEdit1 component.
Sub MsExpressionEdit1OnUpdateFormula(Sender: IMsExpressionEdit; Args: ITermEventArgs);
Begin
If Args.Term = Null Then
Return;
End If;
Args.Term.IsHyperlink := True;
debug.WriteLine(Expression delimiters: + Sender.HeavyDelimiters + );
debug.WriteLine(Words delimiter in the expression: + Sender.LightDelimiters + );
debug.WriteLine(Maximum number of words in the expression: + Sender.MaxTermWordCount.ToString + );
End Sub MsExpressionEdit1OnUpdateFormula;
After executing the example the expression separators data, the words separators in the expression data and the maximum number of words in the expression data is displayed in the console window. Expressions are displayed as hyperlinks.
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.
Private Sub msExpressionEditNet1_OnUpdateFormula(Sender: Prognoz.Platform.Interop.Ms.MsExpressionEdit; Args: Prognoz.Platform.Interop.Forms.TermEventArgs);
Begin
If Args.Term = Null Then
Return;
End If;
Args.Term.IsHyperlink := True;
System.Diagnostics.Debug.WriteLine("Delimiters of expressions: '" + Sender.HeavyDelimiters + "'");
System.Diagnostics.Debug.WriteLine("Words delimiter in the expression: '" + Sender.LightDelimiters + "'");
System.Diagnostics.Debug.WriteLine("Maximum number of words in the expression: '" + Sender.MaxTermWordCount.ToString() + "'");
End Sub;
See also: