Form file concepts / Form items |
Elements defined in a form file can be identified with a name, to be used in programs.
Form fields are implicitely identified by the tabname.colname specification after the equal sign, while other (non-field) form items such as static labels and group boxes can get an optional item name.
The form item name defined in the form file will be copied to the name attribute of the corresponding node in the .42f file. It can then be used by programs to select a form element at runtime, to introspect or modify its attributes.
GROUP group1 (TEXT="Customer")
DEFINE w ui.Window DEFINE g om.DomNode LET w = ui.Window.getCurrent() LET g = w.findNode("Group","group1") CALL g.setAttribute("text","Another text")
DEFINE f ui.Form ... LET f = DIALOG.getForm() ... CALL f.setElementHidden("group1", TRUE)
GRID { Name: [f1 ] ... } END
GRID { [l1 ][f1 ] ... } END ... ATTRIBUTES LABLE l1: l_name, TEXT="Name:"; ...