class SubFormTestForm of FORM with (this) onOpen = class::FORM_ONOPEN onClose = class::FORM_ONCLOSE height = 19.6818 left = 71.5714 top = 4.8182 width = 70.2857 text = "Parent Form" endwith this.TEXT1 = new TEXT(this) with (this.TEXT1) height = 1.7727 left = 1.8571 top = 1.0 width = 37.4286 text = "Form with a subform." endwith this.PUSHBUTTON1 = new PUSHBUTTON(this) with (this.PUSHBUTTON1) onClick = class::PUSHBUTTON1_ONCLICK height = 1.0909 left = 3.2857 top = 11.2727 width = 15.2857 text = "Open SubForm" endwith this.PUSHBUTTON2 = new PUSHBUTTON(this) with (this.PUSHBUTTON2) onClick = class::PUSHBUTTON2_ONCLICK height = 1.0909 left = 3.2857 top = 13.6818 width = 15.2857 text = "Close SubForm" endwith function form_onClose close procedure sub1.sfm return function form_onOpen // instantiate subform set procedure to sub1.sfm form.subform = new sub1Form( this, " My Subform" ) //title passed above is ignored. so set it specifically form.subform.text = "My subform" return function PUSHBUTTON1_onClick form.subform.open() return function PUSHBUTTON2_onClick form.subform.close() return endclass ********* End of subformtest.wfm *********