AddWidget - 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 AddWidget tWidgetDef WidgetDef
Call Example
Send AddWidget 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 |
It is recommended to fill out as many optional elements as possible, as relying on the default values (0 and 1) might cause Widgets to overlap or be mis-sized.