ITermList.CreateLiteral

Syntax

CreateLiteral(Text: String): ITerm;

Parameters

Text. Literal term text.

Description

The CreateLiteral method creates a literal term.

Comments

The literal term differs from the custom term by the possibility of editing, that is, it is possible to edit the text inside the literal term and it is impossible to select the text fragment inside the custom term.

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("+");
    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