home *** CD-ROM | disk | FTP | other *** search
/ PC User 2001 August / APC_Aug2001_CD2.iso / features / devtools / files / lb202win.exe / LB202W.EXE / COMBO.BAS < prev    next >
Encoding:
BASIC Source File  |  2000-12-06  |  978 b   |  35 lines

  1.  
  2.  
  3.     'demonstrate the use of a combobox control
  4.     array$(0) = "the quick brown"
  5.     array$(1) = "fox jumped over"
  6.     array$(2) = "the lazy dog"
  7.  
  8.     WindowWidth = 400
  9.     WindowHeight = 240
  10.     combobox #main.combo, array$(), [noAction], 30, 61, 216, 140
  11.     textbox #main.field, 30, 21, 216, 25
  12.     button #main.intoCombo, ">> combobox", [intoCombo], UL, 254, 21, 128, 25
  13.     button #main.outOfCombo, "combobox >>", [outOfCombo], UL, 254, 56, 128, 25
  14.     open "Combobox example" for window as #main
  15.  
  16.     'wait here for input event
  17.      wait
  18.  
  19.  
  20. [noAction]   'Perform action for the combobox named 'tryme'
  21.  
  22.     'Insert your own code here
  23.     wait
  24.  
  25. [intoCombo]   'Perform action for the button named 'intoCombo'
  26.  
  27.     print #main.field, "!contents? text$"
  28.     print #main.combo, "!"; text$
  29.     wait
  30.  
  31. [outOfCombo]   'Perform action for the button named 'outOfCombo'
  32.  
  33.     print #main.combo, "contents? text$"
  34.     print #main.field, text$
  35.     wait