[<<Previous Entry]
[^^Up^^]
[Next Entry>>]
[Menu]
[About The Guide]
FUNCTION POPUPWHEN()
Short:
------
POPUPWHEN() Allows use of a popup for a GET WHEN clause
Returns:
--------
<lWhen> => when condition, get pre-validation
Syntax:
-------
POPUPWHEN(bPopup,[lShowonUp],[lReturn])
Description:
------------
This sets up a popup in <bPopup> for use in a GET
WHEN clause. (the pre validation block). If a value is returned
from the popup, it is assigned to the get.
<bPopup> is a codeblock that is evaluated. It is
passed the current value in the get as a parameter.
The popup 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 the popup. By setting it to True,
the Calendar will pop up, and then the GET will also be put
through the normal get editor.
Examples:
---------
// these are codeblocks that do a popup (in this case, a simple
//call to msg, and a return of a value)
b1 := {||msg("Character value"),"Bert"}
b2 := {||msg("Logical value"),.t.}
b3 := {||msg("Date value"),date()+100}
v1 := space(10)
v2 := .f.
v3 := ctod(" / / ")
@10,10 get v1 when POPUPWHEN(b1,.f.,.t.)
@11,10 get v2 when POPUPWHEN(b2,.f.,.t.)
@12,10 get v3 when POPUPWHEN(b3,.f.,.t.)
READ
Source:
-------
S_POPVW.PRG
This page created by ng2html v1.05, the Norton guide to HTML conversion utility.
Written by Dave Pearson