Keyboard input function for hidden input (similar to a GET field)

        [<cPrompt>]) --> cInput


     <cDefault>  Designates the length and contents of the input field.

     <nRow>  Designates the row in which the input occurs.  The default
     is the current cursor position.

     <nColumn>  Designates the column in which the input occurs.  The
     default is the current cursor position.

     <lSAY>  When you specify .T. and close GETSECRET(), the actual data
     input is displayed with the default color attribute.

     <cPrompt>  Designates the text to display in front of the input
     field at the selected coordinates.


     GETSECRET() returns the input string.


     If you call this function, a simple input field is made available.  All
     characters input are displayed as asterisks (*) to hide the actual
     input.  All control keys are interpreted exactly as in a Clipper GET

     The length and default for the string are specified in the <cDefault>
     parameter.  This allows a normal input field to be portrayed with VAR =
     SPACE(length).  The input field starts at the current cursor position or
     at the designated row and column.

     Similar to @ ... SAY ... GET, you can also display text just before the
     input field.  The field starting position is moved accordingly

     In the Clipper SET COLOR TO command, the first color you designate is
     used for screen output; the second for input fields. GETSECRET() uses
     these color designators exactly like Clipper.  If you designate the
     <lSAY> parameter as .T., you can determine (as with a SAY), whether the
     data is redisplayed in its amended form at the point of input.  However,
     GETSECRET() only displays asterisks to hide this data.  This is useful
     when input breaks off due to an ESC, because at least the correct number
     of asterisks is displayed.  The affected area also contains the standard
     color attribute.


     .  GETSECRET() uses the Clipper console input internal
        routines and supports the INS display in SCOREBOARD.  In addition,
        CONFIRM switches are acknowledged.

     .  Key traps may occur with GETSECRET() when the cursor position
        within a field is saved.  You can then call GETSECRET() recursively,
        as long as sufficient stack memory is available.


     .  Show the secret field at the current cursor position:

        cVar:= SPACE(20)            // 20 position secret field
        cVar:= GETSECRET(cVar)      // Retain input attribute

     .  Show the secret a 10-space field,  row 10, column 20:

        cVar:= GETSECRET(SPACE(10), 10, 20)

     .  After input is finished, the actual data input is redisplayed
        on the screen.  This area contains the standard color attribute.  The
        input is moved by the text preceding the input field:

        SET CONFIRM ON              //  Close with RETURN
        cVar:= "Default text"
        GETSECRET(cVar, 10, 20, .T., "Please input: ")

See Also: GETINPUT()

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.