Skip to content

AppendWidget - cWebWidgetContainer

Creates and adds a Widget to the container

Type: Procedure

Parameters

Parameter Type Description
WidgetDef tWidgetDef Struct containing the information of the WebWidget to be added

Syntax

Procedure AppendWidget tWidgetDef WidgetDef

Call Example

Send AppendWidget WidgetDef

Description

Creates and adds a Widget to the container based on the information provided.

The struct itself contains more elements than required, as it is multi-purpose and used in other areas of the framework, as well. The only required element is sName, which should be the psWidgetName of the cWebWidget you're trying to add.

Optional elements are: | Constant | Meaning | |---|---| | iRow | Index of the row to place the to be created widget. If not provided, 0 will be used. | | iCol | Index of the column to place the to be created widget. If not provided, 0 will be used. | | iRowSpan | Amount of rows to span, determining the vertical size of the Widget. If not provided, 1 will be used. | | iColSpan | Amount of columns to span, determining the horizontal size of the Widget. If not provided, 1 will be use |

Unlike AddWidget, which gives full control over where the Widget will be placed, AppendWidget tries to use smart logic to place the to be created Widget at the first possible open space in the current configuration. Inside the struct, iRow and iCol are ignored. But iRowSpan and iColSpan are used to size the widget and is used when determining the first available spot.