[<<Previous Entry]
[^^Up^^]
[Next Entry>>]
[Menu]
[About The Guide]
*** Example 3
STORE 'Apricots' TO button
@ 5,0 GET choice FUNCTION '*R \<Apples;\<Apricots;\<Lemons;\<Oranges';
DEFAULT button
READ
***** Effect of SIZE
CLEAR
@ 5,5 GET choice FUNCTION '*R'+ ;
' \<Apples;A\<pricots;\<Lemons;\<Oranges' ;
DEFAULT 'Apples' SIZE 1,10,1
@ 5,20 GET choice2 FUNCTION '*R'+ ;
' \<Apples;A\<pricots;\<Lemons;\<Oranges' ;
DEFAULT 'Apples' SIZE 1,12,3
READ
***** Override color defaults
STORE 1 TO choice
@ 5,0 GET choice FUNCTION '*R Apples;Apricots;Lemons;Orange';
COLOR SCHEME 4
READ
* Defines radio buttons 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 '*R \<Apples;A\<pricots;\\Lemons;Oranges';
COLOR ,,,,,W+/B,R/B,,GR+/B,W/B
READ
+---------------------------------+
| Program Example |
+---------------------------------+
SET TALK OFF
CLEAR
*** If there is no database in use, have user select one ***
IF EMPTY(DBF())
USE ?
ENDIF
*** If the user did not select a database, return ***
IF EMPTY(DBF())
WAIT WINDOW 'No database open' NOWAIT
RETURN
ENDIF
*** Define and activate window for get information ***
DEFINE WINDOW one FROM 3,5 TO 13,33 FLOAT DOUBLE COLOR SCHEME 5
ACTIVATE WINDOW one
*** Define first set of radio buttons ***
@ 1,2 GET choice FUNCTION '*RNV Next;Prior;Top;Bottom';
SIZE 1,10,1 DEFAULT 'Next'
*** Define second set of radio buttons to terminate the read ***
@ 3,15 GET okcancel FUNCTION '*TV \!OK;\?Cancel' DEFAULT 1;
SIZE 1,10,1
READ CYCLE
*** If cancel was selected ***
IF okcancel = 2
WAIT WINDOW 'Cancel Selected' NOWAIT
ELSE
*** If OK was selected ***
*** Set record pointer according to users choice ***
DO CASE
CASE choice = 'Next'
SKIP
IF EOF()
SKIP -1
ENDIF
CASE choice = 'Prior'
IF !BOF()
SKIP -1
ENDIF
CASE choice = 'Top'
GO TOP
CASE choice = 'Bottom'
GO BOTTOM
ENDCASE
*** Display users choice ***
WAIT WINDOW choice+' Selected' NOWAIT
ENDIF
CLEAR WINDOW
-----------------------------------
See Also: @ ... SAY/GET, OBJNUM(), READ, SHOW GETS, USER-DEFINED
FUNCTIONS (UDFs)
-----------------------------------
See Also:
@ ... SAY/GET
OBJNUM()
READ
SHOW GETS
This page created by ng2html v1.05, the Norton guide to HTML conversion utility.
Written by Dave Pearson