I'm trying to create a dialogue box with 2 push buttons and an edit box. When I select the push buttons only, I get the result I want. When I enter text, and select either push button the only event result I get is the edit box ID. It's easy enough to create another dialogue box later to select m/f, but I want to do it all in 1.
Sample:
string name
integer eventid
dialogbox 30 8 20 264 169 2 "PUSHBUTTON TEST"
text 32 38 30 160 11 "Please type your name." left
editbox 33 31 55 194 14 name
pushbutton 34 51 129 40 13 "Male"
pushbutton 35 143 130 40 13 "Female"
text 36 84 111 105 11 "Select your gender" left
enddialog
while 1 ; Loop forever.
dlgEvent 30 EventID ; Get dialog EventID.
switch EventID ; Evaluate the EventID.
case 0 ; No EventID occurred.
endcase
default ; Dialog EventID occurred.
exitwhile ; Exit the while loop.
endcase
endswitch
endwhile
dlgdestroy 30 CANCEL ; Destroy dialog box.
usermsg "event id %d" eventid
if eventid==34
usermsg "MALE"
endif
if eventid==35
usermsg "FEMALE"
endif
usermsg name
BTW Knob, you have been a great help on the telnet script. Thank you
Sample:
string name
integer eventid
dialogbox 30 8 20 264 169 2 "PUSHBUTTON TEST"
text 32 38 30 160 11 "Please type your name." left
editbox 33 31 55 194 14 name
pushbutton 34 51 129 40 13 "Male"
pushbutton 35 143 130 40 13 "Female"
text 36 84 111 105 11 "Select your gender" left
enddialog
while 1 ; Loop forever.
dlgEvent 30 EventID ; Get dialog EventID.
switch EventID ; Evaluate the EventID.
case 0 ; No EventID occurred.
endcase
default ; Dialog EventID occurred.
exitwhile ; Exit the while loop.
endcase
endswitch
endwhile
dlgdestroy 30 CANCEL ; Destroy dialog box.
usermsg "event id %d" eventid
if eventid==34
usermsg "MALE"
endif
if eventid==35
usermsg "FEMALE"
endif
usermsg name
BTW Knob, you have been a great help on the telnet script. Thank you