Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- dBsee 4.6 - The Library - <b>dbaskw()</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
dbAskW()
Asks a question to the user
------------------------------------------------------------------------------
Syntax:

     dbAskW( <cMsg>, <cAnsw> ) --> cChar

Parameters:

     <cMsg>     Message to be visualised.
     <cAnsw>    Answer characters that the user can enter.

Returns:

     <cChar> The character inserted by the user. If he presses Return the
     first character is returned. If he presses Esc the last character of
     the <cAnsw> list.

Description:

     Asks a question to the user.
     
     The question can be split over several lines; use the "//" separator
     to split the question.

Example:

     . Example 1
     
     LOCAL cAnsw
     
     cAnsw := dbAskW("Select the disk drive//A://B:","ab0")
     //
     // Entered key - Returned character
     //
     // Return -  "a".  The first character in the list
     // ESC    -  "0".  The last character in the list
     // A or a -  "a".  The lower case char is in the list
     // B or b -  "b".  The lower case char is in the list
     //
     
     . Example 2
     
     LOCAL nCount := 0, cStr := ""
     
     
     // ErrorBox
     dbMsgErr( "dBsee//The Standard CASE" +;
               " for CLIPPER//Now available !!" )
     
     // Updating Message
     dbMsgOn( "Counter///////" +Str(nCount) )
     FOR nCount := 1 TO 10
        dbMsgUpd( "Counter" +Str(nCount) )
        Inkey(1)
     NEXT
     dbMsgOff( "Counter//" +Str(nCount) )
     
     // Window Message
     dbMsgW( "Message//In a Windows" )
     
     
     // Ask Window
     //                           esc ---+
     //                           ret --+|
     //                                 ||
     dbAskW( "Ask in a Windows (Y/N)", "yn" )
     
     // AlertBox
     dfAlert( "dBsee is The Best Code Generator",;
              {"Yes","NO"} )

See also:

     dbMsgErr(), dbMsgW(), dfAlert()

See Also: dbMsgErr() dbMsgW() dfAlert()

Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson