onOpen example
The following example is the onOpen event handler for the FISH.WFM form. It assigns the popup in FISH.POP as the popup menu for the form. There is no way to set up a popup menu directly in the Form designer.
function Form_onOpen
set procedure to FISH.POP additive
this.popupMenu := new fishPopup(this,"POPUP")
In this example, a CheckBox control toggles the wrap property of an editor on the same form. It reads the wrap property of the editor when the form is opened. This way, the two properties are in sync, and you don’t have to set the checkbox’s value property whenever you change the editor’s wrap property.
function wrapCheckbox_onOpen( )
this.value := form.editor1.wrap