I am trying to create a dialogue box with multiple editbox fields. The sample in Procomm help shows how to use 1 edit box. When I try to use 3 edit boxes, the script closes the dialogue box and continues to execute after filling in 2 editboxes and clicking on the third.
Sample from Procomm help:
proc main
string TextStr ; Text from dialog box.
integer Event ; Dialog box event.
; Define and display dialog with edit box.
dialogbox 0 0 0 100 70 11 "Edit Box Example"
editbox 1 5 5 90 40 TextStr MULTILINE
pushbutton 2 25 50 50 14 "E&xit"
enddialog
while 1
dlgevent 0 Event ; Read dialog event.
switch Event ; Evaluate dialog event.
case 0 ; No event occurred.
endcase
case 1 ; Edit box was changed.
endcase
default ; Exit event selected.
exitwhile ; Exit the loop.
endcase
endswitch
endwhile
dlgdestroy 0 CANCEL ; Destroy dialog box.
if not nullstr TextStr ; See that TextStr isn't empty.
usermsg "You typed:`r`r%s" TextStr
else
usermsg "No text entered."
endif
endproc
My sample:
proc main
string TextStr ; Text from dialog box.
string TextStr2
string TextStr3
integer Event ; Dialog box event.
dialogbox 0 7 25 150 112 11 "Edit Box Example"
editbox 1 12 30 97 9 TextStr
editbox 2 15 49 90 9 TextStr2
editbox 3 15 66 90 9 TextStr3
pushbutton 4 43 88 50 14 "E&xit"
enddialog
while 1
dlgevent 0 Event ; Read dialog event.
switch Event ; Evaluate dialog event.
case 0 ; No event occurred.
endcase
case 1 ; Edit box was changed.
endcase
default ; Exit event selected.
exitwhile ; Exit the loop.
endcase
endswitch
endwhile
dlgdestroy 0 CANCEL ; Destroy dialog box.
if not nullstr TextStr ; See that TextStr isn't empty.
usermsg "You typed:`r`r%s" TextStr
else
usermsg "No text entered."
endif
endproc
Please help. Thank you
Sample from Procomm help:
proc main
string TextStr ; Text from dialog box.
integer Event ; Dialog box event.
; Define and display dialog with edit box.
dialogbox 0 0 0 100 70 11 "Edit Box Example"
editbox 1 5 5 90 40 TextStr MULTILINE
pushbutton 2 25 50 50 14 "E&xit"
enddialog
while 1
dlgevent 0 Event ; Read dialog event.
switch Event ; Evaluate dialog event.
case 0 ; No event occurred.
endcase
case 1 ; Edit box was changed.
endcase
default ; Exit event selected.
exitwhile ; Exit the loop.
endcase
endswitch
endwhile
dlgdestroy 0 CANCEL ; Destroy dialog box.
if not nullstr TextStr ; See that TextStr isn't empty.
usermsg "You typed:`r`r%s" TextStr
else
usermsg "No text entered."
endif
endproc
My sample:
proc main
string TextStr ; Text from dialog box.
string TextStr2
string TextStr3
integer Event ; Dialog box event.
dialogbox 0 7 25 150 112 11 "Edit Box Example"
editbox 1 12 30 97 9 TextStr
editbox 2 15 49 90 9 TextStr2
editbox 3 15 66 90 9 TextStr3
pushbutton 4 43 88 50 14 "E&xit"
enddialog
while 1
dlgevent 0 Event ; Read dialog event.
switch Event ; Evaluate dialog event.
case 0 ; No event occurred.
endcase
case 1 ; Edit box was changed.
endcase
default ; Exit event selected.
exitwhile ; Exit the loop.
endcase
endswitch
endwhile
dlgdestroy 0 CANCEL ; Destroy dialog box.
if not nullstr TextStr ; See that TextStr isn't empty.
usermsg "You typed:`r`r%s" TextStr
else
usermsg "No text entered."
endif
endproc
Please help. Thank you