home *** CD-ROM | disk | FTP | other *** search
/ High Voltage Shareware / high1.zip / high1 / DIR22 / JORF21_2.ZIP / MSGBOXES.J < prev    next >
Text File  |  1993-07-05  |  1KB  |  72 lines

  1. MsgBoxes:Start
  2.   Win:Add ("Message Test")
  3.     MLine:"&Yes",   Action:"MsgBoxes:YesNo"
  4.     MLine:"&No",    Action:"MsgBoxes:NoYes"
  5.     MLine:"&Cancel",Action:"MsgBoxes:Cancel"
  6.     MLine:"&Ok",    Action:"MsgBoxes:OkBox"
  7.     MLine:"&Exit",  Action:"Jorf:Exit"
  8.   Return(Ok)
  9.  
  10.  
  11.  
  12. MsgBoxes:Cancel
  13.   New Result
  14.   Result=Msg:Add ("Cancel", "Cancel")
  15.     This is an Cancel Box!
  16.   Switch
  17.     Case Kbd:Got = 'Esc_Key'
  18.       Msg:Add
  19.         You hit the escape key
  20.     Case Result = Ok
  21.       Msg:Add
  22.         You picked Ok
  23.     Else
  24.       Msg:Add
  25.         You canceled
  26.   Return Ok
  27.  
  28. MsgBoxes:NoYes
  29.   New Result
  30.   Result=Msg:Add ("No/Yes", "No")
  31.     This is a No-Yes Box!
  32.   Switch
  33.     Case Kbd:Got = 'Esc_Key'
  34.       Msg:Add
  35.         You hit the escape key
  36.     Case Result = Ok
  37.       Msg:Add
  38.         You picked yes
  39.     Else
  40.       Msg:Add
  41.         You picked no
  42.   Return Ok
  43.  
  44. MsgBoxes:OkBox
  45.   New Result
  46.   Result=Msg:Add ("Ok", "Ok")
  47.     This is an Ok Box!
  48.   If (Result)
  49.     Msg:Add
  50.       You picked Ok
  51.   else
  52.     Msg:Add
  53.       You hit the escape key.
  54.   Return Ok
  55.  
  56. MsgBoxes:YesNo
  57.   New (Result)
  58.   Result=Msg:Add ("Yes/No", "Yes")
  59.     This is a yes-No Box!
  60.   Switch
  61.     Case Kbd:Got = 'Esc_Key'
  62.       Msg:Add
  63.         You hit the escape key
  64.     Case Result = Ok
  65.       Msg:Add
  66.         You picked yes
  67.     Else
  68.       Msg:Add
  69.         You picked no
  70.   Return Ok
  71.  
  72.