Skip to content

InitDynamicProp - cWebObject

Sets a dynamic property value

Type: Procedure

Parameters

Parameter Type Description
sPropName String Property name
vPropValue Variant Property value

Syntax

Procedure InitDynamicProp String sPropName Variant vPropValue

Call Example

Send InitDynamicProp sPropName vPropValue

Description

Sets a dynamic property value.

Sample

This sample demonstrates how to create two buttons based on the same subclass, but with different captions. Both buttons will be created from the class definition cMyWebButton we created earlier, but their properties will differ.

Get CreateDynamicObject of oContainer (RefClass(cWebGroup)) "oGroup1" "" to hoGroup1
Send InitDynamicProp of hoGroup1 "piColumnCount" 8
Get CreateDynamicObject of oContainer (RefClass(cMyWebButton)) "oButton1" "" to hoButton1
Send InitDynamicProp of hoButton1 "psCaption" "Button 1"
Get CreateDynamicObject of oContainer (RefClass(cMyWebButton)) "oButton2" "" to hoButton2
Send InitDynamicProp of hoButton2 "psCaption" "Button 2"