Add command
Adds a new control to a page.
#
Descriptionadd
command adds a new control to a page.
#
ExamplesThis command adds a new text
control to a column with id header
.
#
Parameterscontrol-type
#
The type of the control.
id
#
Control ID. ID will be auto-generated if not specified. If you need to get generated ID replace add
command with addr
which means "add with result", for example in Bash:
to
#
Parent control ID. If not specified the control is added to the bottom of the page.
at
#
Insert control at the specified position in the children collection.
trim
#
trim
allows to specify the maximum number of children to leave after adding new child controls.
Negative trim
value trims items from the end; positive - from the start.
For example, if we have the following controls tree:
Running add to=lines trim=3 text value='Line 4'
will result into:
so controls were trimmed from the start to have a total number of children at 3
.
On the other hand, running add to=lines at=0 trim=-3 text value='Line 4'
will result into:
so new control was insterted to lines
stack at position 0 and controls were trimmed from the end to have a total number of children at 3
.