** END HEADER -- do not remove this line // // Generated on 06/01/2021 // parameter bModal local f f = new TestValidForm() if (bModal) f.mdi = false // ensure not MDI f.readModal() else f.open() endif class TestValidForm of FORM with (this) metric = 6 // Pixels height = 352.0 left = 222.0 top = 290.0 width = 551.0 text = "" endwith this.TEXT1 = new TEXT(this) with (this.TEXT1) height = 22.0 left = 20.0 top = 12.0 width = 477.0 text = "Test validity of input ... " endwith this.ENTRYFIELD1 = new ENTRYFIELD(this) with (this.ENTRYFIELD1) onChange = class::ENTRYFIELD1_ONCHANGE height = 22.0 left = 22.0 top = 58.0 width = 59.0 picture = "99-99" value = " - " endwith this.ENTRYFIELD2 = new ENTRYFIELD(this) with (this.ENTRYFIELD2) valid = class::ENTRYFIELD2_VALID height = 22.0 left = 141.0 top = 58.0 width = 56.0 picture = "99-99" value = " - " validRequired = true validErrorMsg = "Enter all four digits" endwith this.TEXT2 = new TEXT(this) with (this.TEXT2) height = 22.0 left = 22.0 top = 93.0 width = 84.0 text = "onChange" endwith this.TEXT3 = new TEXT(this) with (this.TEXT3) height = 22.0 left = 141.0 top = 93.0 width = 84.0 text = "valid" endwith function ENTRYFIELD1_onChange() ? "Entryfield2: " + len( trim(this.value) ) if len( trim(this.value) ) < 5 msgbox( "Please enter all four digits!", "Invalid entry", 16 ) form.entryfield1.setFocus() endif return function ENTRYFIELD2_valid() bReturn = true ? "Entryfield2: " + len( trim(this.value) ) if len( trim(this.value) ) < 5 bReturn = false endif return bReturn endclass