Skip to content

tWidgetDef

See Also: tWidgetDef, tWidgetConfigPropValue, tWidgetConfigPropSettings, Declaring Variables, Struct

Purpose

tWidgetDef is a structured type that is used to represent information about a cWebWidget configurable property.

This struct is used throughout the cWebWidget and cWebWidgetContainer classes. The tWidgetDef struct is used to communicate information about a widget template, an instance to be created, or an existing widget instance. The use case for the values of the struct members can vary based on where it is used.

Type Declaration

Struct tWidgetDef
    String sName
    String sDynId
    Integer iRowIndex
    Integer iColIndex
    Integer iRowSpan
    Integer iColSpan
    Boolean bFillHeight
    tWidgetConfigPropValue[] aConfig
    tWebPropRule[] aResponsivePropRules
End_Struct

Struct Members

  • sName
    Unique name stemming from the widget’s class/composite. Maps to psWidgetName inside the cWebWidget and is used to identify what class to create an instance from.

  • sDynId
    Unique identifier assigned by the cWebWidgetContainer upon creating an instance of the widget. Blank or ignored until assigned.

  • iRowIndex
    Row index this widget is to be placed inside the container’s grid, or this widget’s current row index inside the container.

  • iColIndex
    Column index this widget is to be placed inside the container’s grid, or this widget’s current column index inside the container.

  • iRowSpan
    Amount of rows this widget is to occupy inside the container’s grid, or this widget’s current amount of rows it occupies.

  • iColSpan
    Amount of columns this widget is to occupy inside the container’s grid, or this widget’s current amount of columns it occupies.

  • bFillHeight
    Determines whether this widget should always vertically fill out all rows it occupies. For now, this is always true (or ignored). Widgets are always full height so that they fill out the rows that they occupy.

  • aConfig
    Array of tWidgetConfigPropValue structs. This contains the values of the widget’s configurable properties. These values can be the widget’s current configurable property values or used upon creation of a widget to set the configurable property values.

  • aResponsivePropRules
    Array used to store responsive rules for this widget. This is automatically filled by the WebSetResponsive instruction but can be manipulated manually.

Syntax

Use WebWidgetStructs.pkg
:
tWidgetDef {variableName}

Declaring Variables

To declare tWidgetDef variables, use the name of the type (tWidgetDef) followed by the variable name.

tWidgetDef wdDefOne

See struct variables for more details on instantiating struct types.