MsExpressionEdit.OnUpdateText

Syntax

OnUpdateText(Sender: IMsExpressionEdit; Args: ITermEventArgs);

Parameters

Sender. Component that has generated the event.

Args. Event arguments.

Description

The OnUpdateText event occurs on converting the internal view of expression into the external one.

Comments

The OnUpdateText event is called for the custom terms, the formula and the text of which match. It enables the user to transform the expression, stored in the internal view, into the external one.

The event is triggered by changes of the entire expression, but not its properties.

Converting the internal view into the external one takes place for example on change the formula in the MsExpressionEdit component via the IMsExpressionEdit.Expression property.

Example

This example is a handler of the OnUpdateText event for the MsExpressionEdit component with the MsExpressionEdit1 identifier.

Sub MsExpressionEdit1OnUpdateText(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 MsExpressionEdit1OnUpdateText;

After executing the example the expression delimiters data, the data of the words delimiters in the expression and the maximum words number in the expression data is displayed in the console window. Expressions are displayed as hyperlinks.

See also:

MsExpressionEdit