home *** CD-ROM | disk | FTP | other *** search
- FUNCTION Button()
- LOCAL TheScreen, OldColor, TheChoice := 0, wB1, wB2, wB3, wB4
-
- TheScreen := Win_Open(19, 1, 22, 42, ' Select ')
- Msg('Select a menu option')
-
- OldColor := Menu_Color()
-
- wB1 := CRTAddButton(ADD_MODE, "Add", 20, 3, 2, 8)
- wB2 := CRTAddButton(CHANGE_MODE, "Change", 20, 13, 2, 8)
- wB3 := CRTAddButton(DELETE_MODE, "Delete", 20, 23, 2, 8)
- wB4 := CRTAddButton(EXIT_MODE, "Exit", 20, 33, 2, 8)
-
- DO WHILE TheChoice <> ADD_MODE .AND. TheChoice <> CHANGE_MODE .AND. ;
- TheChoice <> DELETE_MODE .AND. TheChoice <> EXIT_MODE .AND. ;
- TheChoice <> K_ESC
- TheChoice := InKey(0)
- ENDDO
-
- CRTRemoveButton(wB1)
- CRTRemoveButton(wB2)
- CRTRemoveButton(wB3)
- CRTRemoveButton(wB4)
-
- SetColor(OldColor)
- Win_Close(TheScreen)
-
- IF TheChoice = K_ESC
- RETURN 0
- ELSE
- RETURN TheChoice
- ENDIF
-
-
-
-
-
-