ITermList.CreateCustom

Syntax

CreateCustom(Text: String; Formula: String): ITerm;

Parameters

Text. Custom term text.

Formula. Custom term formula.

Description

The CreateCustom method creates a custom term.

Comments

It is impossible to edit text in the custom term as opposed to the literal one. Only whole custom term can be selected.

Example

Executing the example requires a form with the button named Button1 on the form and the TermEdit component named TermEdit1.

Sub Button1OnClick(Sender: Object; Args: IMouseEventArgs);
Var
    Terms: ITermList;
    Te: ITerm;
    i: Integer;
Begin
    Terms := TermEdit1.Terms;
    Te := Terms.CreateCustom("A""@a");
    i := TermEdit1.PutTerm(Te);
    TermEdit1.Hyperlink(i) := True;
    Te := Terms.CreateLiteral("+");
    i := TermEdit1.PutTerm(Te);
    Te := Terms.CreateCustom("B""@b");
    i := TermEdit1.PutTerm(Te);
    TermEdit1.Hyperlink(i) := True;
End Sub Button1OnClick;

After executing the example clicking the button creates three terms for the TermEdit1 component. The expression is composed of them. The terms are displayed as the hyperlinks.

See also:

ITermList