Skip to main content

Form (폼) Widget Control

This page lists the Widget Control (Property · Method · Event) you use to control the Form widget from a script. For an introduction to the widget and how to use it, visit Form.

info

In the examples below, formID is the name (ID) you assigned to the Form widget on the canvas. In a script, access members as widgetID.member.

Widget Control summary

Widget ControlKindSignatureDescription
loadFormMethodformID.loadForm(formPath, linkArg)Loads or replaces the Form shown in the container
postMessageMethodformID.postMessage(name, data)Sends data to the message handler of the contained Form

Property

info

Not applicable — the Form widget has no script-only Property. In scripts, read and write values with the common Widget Control below (getProperty / setProperty).

Method

loadForm

Loads the Form to show in the container, or replaces the Form already on display with a different one. If the same Form is already loaded or still loading, this does nothing.

  • Kind: Method
  • Parameters
    • formPath (string): the ID (path) of the Form to load
    • linkArg: the link argument to pass to the loaded Form (null allowed)
  • Returns: None (no return value)

Example

formID.loadForm("group/myForm", arg);

postMessage

Sends a message to the onMessage handler of the contained Form. If the Form is still loading, the message is queued and delivered once loading finishes.

  • Kind: Method
  • Parameters
    • name (string): the message name the Form listens for
    • data: the data to pass to the Form's message handler
  • Returns: None (no return value)

Example

formID.postMessage("refresh", { code: "005930" });

Event

info

Not applicable — the Form widget has no dedicated Event.

Common Widget Control (all widgets)

note

Every widget supports name-based common Widget Control (Method) such as setProperty, getProperty, and setStyleProperty. See the common reference doc (to be written).