Phone API Reference - UI Classes (Widgets) - Widget (Base Class) - setProp
Phone API Reference - UI Classes (Widgets) - Widget (Base Class) - setProp
setProp
Description
Assigns a value to the specified widget property and returns the widget. This function can be used to chain multiple property assignments.
Basic Example:Â
exampleObj.setProp(key, value); |
Parameters
Name | Required | Type | Default | Description |
---|---|---|---|---|
value | Yes | varied | Â | Desired value for the property. |
key | Yes | string | Â | If provided, value[key] is forced into an array. |
Examples
setProp assigns focusable and h
testWidget.setProp('focusable', 1).setProp('h', 100); |
Â