FB II Compiler

PG PRO

Debugging

Memory

System

Mathematics

Resources

Disk I/O

Windows

Controls

Menus

Mouse

Keyboard

Text

Fonts

Drawing

Sound

Clipboard

Printing

Communication

ASM

Made with FB

KEYBOARD

Perform a scroll with up & down arrows


Here's a demo that does just that:
_upArrow = 30
_downArrow = 31
_scrollMin = 0                                    'change as required
_scrollMax = 20                                   'change as required
'---------------------------------
LOCAL FN DoDialog
  evnt = DIALOG(0)
  id = DIALOG(evnt)
  SELECT CASE evnt
    CASE _btnClick
      '(This event triggered when user moves
      'scroll thumb with mouse.  Just note the
      'new position and display it in the edit field.)
      EDIT$(1) = STR$(BUTTON(1))
    CASE _evKey
      LONG IF id = _upArrow OR id = _downArrow
        thumb = BUTTON(1)                         'read current position
        SELECT CASE id
          CASE _upArrow
            IF thumb > _scrollMin THEN DEC(thumb)
          CASE _downArrow
            IF thumb < _scrollMax THEN INC(thumb)
        END SELECT
        SCROLL BUTTON 1, thumb                    'set new position
        EDIT$(1) = STR$(thumb)
      END IF
    CASE _wndClose
      END
  END SELECT
END FN
'===============
WINDOW 1, "", (0,0)-(100,400), _docNoGrow
current = _scrollMin
SCROLL BUTTON 1, current, _scrollMin, _scrollMax, 5, (42,10)-(58,350),_scrollOther
TEXT _sysFont, 12
EDIT FIELD 1, "0", (10,370)-(90,390), _statNoFramed, _centerJust
ON DIALOG FN DoDialog
DO
  HANDLEEVENTS
UNTIL _false

Greg