[<<Previous Entry]
[^^Up^^]
[Next Entry>>]
[Menu]
[About The Guide]
+---------------------------------+
| SHOW GETS |
+---------------------------------+
SHOW GETS
[ENABLE | DISABLE]
[LEVEL <expN1>]
[OFF | ONLY]
[WINDOW <window name>]
[LOCK]
[COLOR <color pair list>
| COLOR SCHEME <expN2>]
-----------------------------------
Redisplays all GET objects.
-----------------------------------
When values of GET fields change (you've moved to a new record, for
example), SHOW GETS updates the values of the GET fields. When objects
are redisplayed, they can optionally be enabled or disabled.
A routine containing SHOW GETS can be used to redisplay GET objects. A
GET LEVEL VALID or WHEN, or a READ LEVEL ACTIVATE or DEACTIVATE routine
could contain a SHOW GETS.
READ supports a SHOW clause that executes a routine (typically a UDF)
whenever SHOW GETS is issued. A SHOW routine is often used to refresh @
... SAYs. When SHOW GETS is issued, the SHOW routine is executed
followed by the redisplay of all the GET fields.
Clauses
-------
ENABLE | DISABLE
Including ENABLE allows all objects to be selected or chosen.
Including DISABLE prevents all objects from being selected or chosen,
and objects are redisplayed in the disabled colors.
LEVEL <expN1>
Nested READs can be created by issuing GETs and a READ in a routine
called while in READ. READs can be nested to five levels.
If LEVEL isn't included, SHOW GETS defaults to the current READ level.
Including LEVEL lets you redisplay objects on a READ level other than
the current level. The numeric expression <expN2> can assume the value
1, 2, 3, 4 or 5 corresponding to the READ level of the objects you want
to redisplay.
OFF | ONLY
When OFF is included, SHOW GETS executes only READ SHOW routine and
does not refresh any GETS. When ONLY is specified, SHOW GETS refreshes
only the GETS; it does not execute the READ SHOW routine.
WINDOW <window name>
GET objects can be placed in different windows and activated with a
single READ. The window clause lets you show all GETS in a particular
window without redisplaying GETS in all windows. Include window name
where objects will be redisplayed. If you issue SHOW GETS without a
WINDOW clause, SYS(2016) returns *. If you issue SHOW GETS with a
WINDOW clause, SYS(2016) returns the name of the window.
LOCK
SHOW GETS assumes the record locking behavior of the READ. If READ or
READ LOCK is issued, SHOW GETS attempts to lock the records involved in
the READ. If READ NOLOCK is issued, SHOW GETS makes no attempt to lock
records and all fields involved in the READ are made read-only.
If LOCK keyword is included in SHOW GETS, SHOW GETS always attempts to
lock the records involved in the READ. Issuing SHOW GETS LOCK lets you
override a READ NOLOCK.
COLOR <color pair list>
COLOR SCHEME <expN2>
Objects can be redisplayed in colors you specify. You can specify a
color pair list or a color scheme.
+---------------------------------+
| Program Example |
+---------------------------------+
CLOSE ALL
SET TALK OFF
DEFINE WINDOW customer FROM 3,3 TO 13,57 ;
FLOAT SHADOW DOUBLE
DEFINE WINDOW panel2 FROM 2, 61 TO 14,74 ;
FLOAT SHADOW DOUBLE COLOR SCHEME 5
USE customer
ACTIVATE WINDOW customer NOSHOW
@ 3,3 SAY 'Company'
@ 3,14 GET customer.company SIZE 1,35
@ 5,3 SAY 'Contact'
@ 5,14 GET customer.contact SIZE 1,35
@ 7,3 SAY 'City/State'
@ 7,14 GET customer.city SIZE 1,21
@ 7,36 GET customer.state
@ 7,39 GET customer.zip
@ 0,3 SAY 'Customer #'
@ 0,15 SAY cust_id SIZE 1,6
@ 0,36 SAY 'Record #'
@ 0,46 SAY RECNO() SIZE 1,3
ACTIVATE WINDOW panel2
@ 1,2 GET act PICTURE '@*VN Top;Prior;Next;Bottom;\?Quit' ;
SIZE 1,8,1 DEFAULT 0 VALID actvalid()
READ CYCLE SHOW readshow() COLOR ,r/bg
RELEASE WINDOWS customer,panel2
FUNCTION actvalid
DO CASE
CASE act = 1
GO TOP
CASE ACT = 2
SKIP -1
IF BOF()
GO TOP
ENDIF
CASE ACT = 3
SKIP 1
IF EOF()
GO BOTTOM
ENDIF
CASE act = 4
GO BOTTOM
CASE act = 5
CLEAR READ
ENDCASE
SHOW GETS
RETURN 0
FUNCTION readshow
STORE WOUTPUT() TO currwind
IF SYS(2016) = 'customer' OR SYS(2016) = '*'
ACTIVATE WINDOW customer SAME
@ 0,15 SAY cust_id SIZE 1,6
@ 0,46 SAY RECNO() SIZE 1,3
ENDIF
IF NOT EMPTY(currwind)
ACTIVATE WINDOW (currwind) SAME
ENDIF
RETURN .T.
-----------------------------------
See Also: @ ... SAY/GET, CLEAR, _CUROBJ, OBJNUM(), RDLEVEL(), READ,
SHOW GET, SHOW OBJECT, SYS(2016) SHOW GETS WINDOW
-----------------------------------
See Also:
@ ... SAY/GET
CLEAR
OBJNUM()
RDLEVEL()
READ
This page created by ng2html v1.05, the Norton guide to HTML conversion utility.
Written by Dave Pearson