CreateTextField
Creates a text field.
Syntax
expression.CreateTextField(aRect);
expression - A variable that represents a Api class.
Parameters
| Name | Required/Optional | Data type | Default | Description |
|---|---|---|---|---|
| aRect | Required | Rect | widget rect |
Returns
Example
How to create and add a text field to document.
- Code
- Result
let doc = Api.GetDocument();
let page = doc.GetPage(0);
let textField = Api.CreateTextField([10, 10, 160, 32]);
page.AddObject(textField);
textField.SetValue('This is the text field');