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>dfautoform()</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
dfAutoForm()
Creates an automatic Form
------------------------------------------------------------------------------
Syntax:

     dfAutoForm( [<nRow>], [<nCol>], <aCTRL>, [<cTit>],;
             [<cState>], [<cID>], [<lCheckEsc>] ) --> lRet

Parameters:

     <nRow>, <nCol> Offsets. If equal to -1, the object is automatically
     centered
     <aCtrl>    Array of controls. Two pushbuttons are automatically added,
     identified by "__WRI" and "__ESC", so that the Form can be
     used with the mouse
     <cTit>     Form title
     <cState>   Form status
     <cID>      Startup ID
     <lCheckEsc> Check esc key. DEFAULT .T.

Returns:

     <lRet> If .T. the Form was not saved

Description:

     An automatic FORM is created which displays the given controls

Example:

     . Example 1
     
     LOCAL aCTRL := {}
     
     ATTACH "0001" TO aCTRL GET AS PUSHBUTTON "Push";
        AT  nBottom+1, nLeft+nPos+8   ;// Coordinates
        FUNCTION {||dbAct2Kbd("esc")} ;// Function
        ACTIVE   .T.                  ;// Activation
        MESSAGE ""                     // Message
     
     dfAutoForm( NIL, NIL, aCTRL )
     
     . Example 2
     
     LOCAL cTxtWri := SPACE(55), aForm := {}
     
     ATTACH "" TO aForm                 ;
         GET cTxtWri AT 1, 20         ; // Field , Top+Left
         PROMPT "prompt message"        ; // Prompt
         PROMPTAT 1,1                  ; // Prompt position
         PICTUREGET "@S30"              ; // Get picture
         PICTURESAY "@S30"              ; // Say picture
         MESSAGE "message in user line"   // Message
     
     IF dfAutoForm( , , aForm, dfStdMsg(MSG_DFMEMOWRI03) )
        dbMsgErr( "OK 8->" )
     ELSE
        dbMsgErr( "KO 8-<" )
     ENDIF

See also:

     ddDe()

See Also: ddDe()

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