ui.Window.createForm

Create a new empty form in a window.

Syntax

createForm(
   name STRING )
  RETURNING result ui.Form
  1. name is the name for the form.

Usage

The createForm() method can be used to create a new empty form in the window object. This is typically used to build forms dynamically, by creating the elements with the OM API.

Important: It is mandatory to create a form in a window with the createForm() method, otherwise it is not usable.

The method returns a new ui.Form instance or NULL if the form name passed as the parameter identifies an existing form used by the window.

Example

DEFINE w ui.Window,
       f ui.Form,
       n, g om.DomNode
OPEN WINDOW w1 WITH 10 ROWS, 20 COLUMNS
LET w = ui.Window.getCurrent()
LET f = w.createForm("myform")
LET n = f.getNode()
LET g = f.createChild("Grid")