[<<Previous Entry]
[^^Up^^]
[Next Entry>>]
[Menu]
[About The Guide]
FUNCTION CALCWHEN()
Short:
------
CALCWHEN() Uses GETCALC() calculator function as a GET WHEN
clause
Returns:
--------
<lWhen> => when condition
Syntax:
-------
CALCWHEN([lShowonUp],[lReturn])
Description:
------------
This sets up the popup GETCALC() calculator for use
in a GET WHEN clause. (the pre validation block). If a value is
selected, it is assigned to the get. (if ESCAPE is pressed, it
is no) The Calculator function will pop up upon entry into a GET
field.
[lShowOnUp] Normally you wouldn't want this WHEN to
occur if the user is using the up arrow, and if <lShowOnUp> is
.f. (the default) it does not occur (the GET is just skipped)
[lReturn] If set to False (the default) the GET is
never actually edited, as the WHEN will always return .f., but
it is assigned the value returned by GETCALC(). By setting it to
True, the Calculator will pop up, and then the GET will also be
put thorugh the normal get editor.
Examples:
---------
proc test
v1 := 10
v2 := 10
v3 := 10
v4 := 10
@10,10 get v1
@11,10 get v2 when calcwhen(.f.) // calculator pops up when
// get is entered. No direct
// editing.
@12,10 get v3 valid calcvalid( {||v3>0} )
@13,10 get v4
read
Notes:
-------
You might want to look at CALCVALID() and CALCKSET()
for other options.
Source:
-------
S_CALCVW.PRG
This page created by ng2html v1.05, the Norton guide to HTML conversion utility.
Written by Dave Pearson