Skip to main content

getProperty

Reads a property value on the widget body by name. It works on the same target as setProperty — the widget body's properties.

info

This is a Widget Control that every widget shares. The widgetID in the examples below is the name (ID) you assigned to the widget on the canvas, and in scripts you access members in the form widgetID.member.

  • Parameters
    • name (string): The name of the widget property to read
  • Returns: any - The property value. Returns null if no property with that name exists. Color and enum-style properties come back as strings.

Example

const t = textID.getProperty("text");
warning

A property name that does not exist returns null without raising an error. The return value alone therefore cannot tell you whether the value is genuinely empty or the name is wrong. Available property names differ from widget to widget, so check the property names for that widget before using them.