Overview
Functions
All Functions
Array Functions
Conversion Functions
Superlib Environment Functions
Other Info
Superlib Environment Functions
Other Info
PRNTFRML() Short: ------ PRNTFRML() Prints a formletter created by formletr() Returns: -------- Nothing Syntax: ------- PRNTFRML(cForm,[nPageWidth],[nLeftMargin]) Description: ------------ Prints the form <cForm> from FORMS.DBF with a pagewidth of [nPageWidth] and a left margin of [nLeftMargin] <cForm> is normally the contents of the template stored in FORMS.DBF (previous documentation refered to this parameter as the NAME of the form, which is incorrect. Examples: --------- This is used internally by FORMLETR() and FASTFORM(). Refer to its usage there. SELECT 0 USE FORM locate for descript = "MY FORM LETTER" // find letter cForm = form->memo_orig // load contents USE SELECT MYDBF PRNTFRML(cForm,79) Source: ------- S_PRNTF.PRG
PRNT() Short: ------ PRNT() Writes a string of a given color at row, column Returns: -------- Nothing Syntax: ------- PRNT(nRow, nColumn, cString, nColor) Description: ------------ <nRow> row <nColumn> column <cString> string <nColor> color attribute Examples: --------- PRNT(10,10,"Hello there",47) // +W/G Notes: ------- Here mainly for compatibility with older version. Was previously a C function. Source: ------- S_PRNT.PRG
PRNPORT() Short: ------ PRNPORT() Determine Printer Port to use Returns: -------- <cPort> => port chosen Syntax: ------- PRNPORT([cPort1],[cPort2]..[cPort9]) Description: ------------ Allows user to select printer port for SET PRINTER TO output. Printer is set to this port [cPort1-9] are valid SET PRINTER TO strings LPT1 LPT2 LPT3 COM1 COM2 COM3 COM4 <FILENAME> Default is "LPT1","LPT2","LPT3" Examples: --------- cTheport := PRNPORT("LPT1","COM1") Source: ------- S_PRNPOR.PRG
POPVYEAR() Short: ------ POPVYEAR() Pops up a picklist of virtual years Returns: -------- <nSelected> => selected year Syntax: ------- POPVYEAR([cTitle]) Description: ------------ Pops up a virtual picklist of years, beginning with the current year. As user scrolls down, year increases. As user scrolls up, year decreases. Home key returns to the starting year. [cTitle] is a popup box title, none by default Examples: --------- nYear := POPVYEAR("Pick a Year") Source: ------- S_DPOPS.PRG
POPVDATE() Short: ------ POPVDATE() Pops up a picklist of virtual dates Returns: -------- <dSelected> => selected date Syntax: ------- POPVDATE([dStart],[lWords],[cTitle]) Description: ------------ Pops up a virtual picklist of dates, beginning with the current date. As user scrolls down, date increases. As user scrolls up, date decreases. Page up/Page down move by 30 day increments. Ctrl-Pgup/Ctrl-Pgdn move by 365 day increments. Home key returns to the starting date. [dStart] the starting date, today's date by default [lWords] show dates as words, False by default [cTitle] popup box title, none by default Examples: --------- dDate := POPVDATE(date(),.t.,"Pick a Date") Source: ------- S_DPOPS.PRG
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
POPUPVALID() Short: ------ POPUPVALID() Allows use of a popup for a GET VALID clause Returns: -------- <lValid> => valid condition, get post-validation Syntax: ------- POPUPVALID(bPopup,[bValid]) Description: ------------ This sets up a popup in <bPopup> for use in a GET VALID clause. (the post validation block). If a value is returned from the popup, it is assigned to the get.The popup function will pop up upon exit from the GET field. <bPopup> is a codeblock that is evaluated. It is passed the current value in the get as a parameter. [bValid] - If you pass a validation codeblock, it will be checked first. If the GET is already valid, according to the codeblock, the popup will not be popped up. The codeblock must return a logical value. 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} b4 := {||msg("Number value"),123} v1 := space(10) v2 := .f. v3 := ctod(" / / ") v4 := 0 // these are added in as valid clauses to the gets. The <bValid> // param is a codeblock that checks for the value being empty. @14,10 get v1 valid POPUPVALID(b1,{||!empty(v1)}) @15,10 get v2 valid POPUPVALID(b2,{||!empty(v2)}) @16,10 get v3 valid POPUPVALID(b3,{||!empty(v3)}) @17,10 get v4 valid POPUPVALID(b4,{||!empty(v4)}) read Source: ------- S_POPVW.PRG
POPUPKSET() Short: ------ POPUPKSET() Set a popup for hotkey access from a GET Returns: -------- Nil Syntax: ------- POPUPKSET(nKey,cProc,cVar,bPopup) Description: ------------ When key <nKey> is pressed while in proc or function <cProc> and in get/variable <cVar>, the block <bPopup> will be evaluated. If <bPopup> returns a value, it will be assigned to the current get. Be sure to clear popups with POPUPKCLR() after the READ. Examples: --------- #include "inkey.ch" proc test b1 := {||msg("Character value"),"Bert"} b2 := {||msg("Logical value"),.t.} b3 := {||msg("Date value"),date()+100} b4 := {||msg("Number value"),123} v1 := space(10) v2 := .f. v3 := ctod(" / / ") v4 := 0 POPUPKSET(K_F1,"TEST","V1",b1) POPUPKSET(K_F2,"TEST","V2",b2) POPUPKSET(K_F3,"TEST","V3",b3) POPUPKSET(K_F4,"TEST","V4",b4) @14,10 get v1 // if F1 is pressed here, b1 will be evaluated @15,10 get v2 // if F2 is pressed here, b2 will be evaluated @16,10 get v3 // if F3 is pressed here, b3 will be evaluated @17,10 get v4 // if F4 is pressed here, b4 will be evaluated read POPUPKCLR() Source: ------- S_POPUPK.PRG
POPUPKCLR() Short: ------ POPUPKCLR() Clears GET hotkey popups set up with POPUPKSET() Returns: -------- Nil Syntax: ------- POPUPKCLR() Description: ------------ Clears GET hotkey popups set up with POPUPKSET() See POPUPKSET() Examples: --------- POPUPKCLR() Source: ------- S_POPUPK.PRG