home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / lb091.zip / RADIOBTN.BAS < prev    next >
BASIC Source File  |  1994-03-12  |  1KB  |  46 lines

  1.  
  2.     'demonstrates radiobuttons
  3.  
  4.     'don't open a main window, please
  5.     nomainwin
  6.  
  7.     WindowWidth = 270
  8.     WindowHeight = 200
  9.  
  10.     statictext #cfg, "Confirm File Operations:", 20, 20, 200, 20
  11.     radiobutton #cfg.always, "Always", [alwaysConfirm], [nil], 40, 45, 130, 20
  12.     radiobutton #cfg.whenReplacing, "When Replacing", [whenReplacingConfirm], [nil], 40, 70, 130, 20
  13.     radiobutton #cfg.never, "Never", [neverConfirm], [nil], 40, 95, 130, 20
  14.     button #cfg, " &OK ", [cfgOk], UL, 20, 125
  15.     open "Action Confirmation - Setup" for dialog as #cfg
  16.     print #cfg, "trapclose [cfgOk]"
  17.  
  18. [inputLoop]
  19.     input h$
  20.     goto [inputLoop]
  21.  
  22. [alwaysConfirm]
  23.  
  24.     confrm$ = "always"
  25.     goto [inputLoop]
  26.  
  27. [whenReplacingConfirm]
  28.  
  29.     confrm$ = "whenReplacing"
  30.     goto [inputLoop]
  31.  
  32. [neverConfirm]
  33.  
  34.     confrm$ = "never"
  35.     goto [inputLoop]
  36.  
  37.  
  38. [cfgOk]
  39.  
  40.     confirm "Save this configuration?"; answer$
  41.     'perform some sort of save for config here
  42.  
  43.     close #cfg
  44.  
  45.     end
  46.