[<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
STORE 1 TO choice
@ 2,2 GET choice PICTURE '@* OK;Cancel' SIZE 1, 8
READ

STORE 1 TO choice
@ 2,2 GET choice PICTURE '@*' + ' OK;Cancel' SIZE 1, 8
READ
This example disables the OK push button:

STORE 1 TO choice
@ 4,2 GET choice FUNCTION '* \\OK;Cancel'
READ

***** Defines OK button as default push button
STORE 1 TO choice
@ 4,2 GET choice FUNCTION '* \!OK;Cancel'
READ

***** Defines Cancel push button as escape push button
STORE 1 TO choice
@ 4,2 GET choice FUNCTION '* OK;\?Cancel'
READ

***** Buttons with Combined Characteristics
STORE 1 TO choice
@ 4,2 GET choice FUNCTION '*  \!\<OK;\?\<Cancel'
READ

***** Valid DEFAULT clauses
@ 5,0 GET choice FUNCTION '* OK;Cancel' DEFAULT 'OK'
READ

@ 5,0 GET choice FUNCTION '* OK;Cancel' DEFAULT 2
READ

STORE 'OK' TO button
@ 5,0 GET choice FUNCTION '* OK;CANCEL' DEFAULT button
READ
The following example demonstrates the effect of SIZE:

CLEAR
@ 5,5 GET choice FUNCTION '* OK;Cancel' ;
        DEFAULT 1 SIZE 1,10,0
@ 5,20 GET choice FUNCTION '* OK;Cancel' ;
        DEFAULT 1 SIZE 1,10,2
READ

*****  Push button with UDF
USE ?
IF EMPTY (DBF())
  WAIT WINDOW 'No database open' NOWAIT
ENDIF

SET TALK OFF
DEFINE WINDOW one FROM 3,5 TO 18,20 FLOAT DOUBLE COLOR SCHEME 5
ACTIVATE WINDOW one
@ 1,2 GET choice FUNCTION '*NV Next;Prior;Top;Bottom;Quit';
 SIZE 1,10,1 VALID GOREC() DEFAULT(1)
READ CYCLE
CLEAR WINDOW

PROCEDURE gorec
DO CASE
        CASE choice = 1
                SKIP
                IF EOF()
                  SKIP -1
                ENDIF
        CASE choice = 2
                SKIP -1
                IF BOF()
                  SKIP
                ENDIF
        CASE choice = 3
                GO TOP
        CASE choice = 4
                GO BOTTOM
        CASE choice = 5
                CLEAR READ
ENDCASE
@ 12,6 SAY ALLTRIM(STR(RECNO()))
RETURN

***** Override color defaults
STORE 1 TO choice
@ 5,0 GET choice FUNCTION '* \<OK;\<CANCEL' COLOR SCHEME 4
READ

*       Defines push button with hot keys and color characteristics
*               Selected button         bright white prompt on blue background (W+/B)
*               Hot key                         red on blue background (R/B)
*               Enabled buttons         yellow prompt on blue background (GR+/B)
*               Disabled buttons        white prompt on blue background (W/B)
STORE 1 TO choice
@ 5,0 GET choice FUNCTION '* \<OK;\<CANCEL;\\DISABLED';
        COLOR ,,,,,W+/B,R/B,,GR+/B,W/B
READ

-----------------------------------

See Also:  @ ... SAY/GET, READ, SHOW GETS, OBJNUM(), USER-DEFINED
FUNCTIONS (UDFs)

-----------------------------------

See Also: @ ... SAY/GET READ SHOW GETS OBJNUM()
This page created by ng2html v1.05, the Norton guide to HTML conversion utility. Written by Dave Pearson