CreateLiteral(Text: String): ITerm;
Text - text of literal term.
The CreateLiteral method creates a literal term.
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.
Executing the example requires a form, a button named Button1 on it 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: