home *** CD-ROM | disk | FTP | other *** search
/ HTBasic 9.3 / HTBasic 9.3.iso / 83win / data1.cab / Basic_Plus_Examples / BARSWDGT < prev    next >
Encoding:
Text File  |  2001-03-02  |  879 b   |  26 lines

  1. 10    ! ***************************************************
  2. 20    ! Example: BARS Widget
  3. 30    !
  4. 40    ! This program creates a BARS widget with one bar
  5. 50    ! and displays voltage values from 1 to 100 volts.
  6. 60    !
  7. 70    ! ***************************************************
  8. 80    !
  9. 90       INTEGER M,N
  10. 100       ASSIGN @Bars TO WIDGET "BARS"
  11. 110       CONTROL @Bars;SET ("TITLE":" Example: BARS Widget")
  12. 120       CONTROL @Bars;SET ("X":50,"Y":25)
  13. 130       CONTROL @Bars;SET ("BAR LABEL":"Voltage")
  14. 140       CONTROL @Bars;SET ("SYSTEM MENU":"Quit")
  15. 150       ON EVENT @Bars,"SYSTEM MENU" GOTO Finis
  16. 160   !
  17. 170       FOR M=1 TO 5
  18. 180           FOR N=1 TO 100
  19. 190               CONTROL @Bars;SET ("VALUE":N)
  20. 200               WAIT .05
  21. 210           NEXT N
  22. 220       NEXT M
  23. 230  Finis:!
  24. 240       ASSIGN @Bars TO *! Delete BARS widget
  25. 250       END
  26.