Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- TSDWIN: Clipper 5.0 Interface Library - Norton Guide http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]

 twCalendar( dDate, nT, nL, wColor, wSType, ;
             wFType, wFColor, lPaste )
 ----------------------------------------------------------------------------
     Display a calendar and allow option pasting into GETs.

     The cursor keys govern the operation as follows:

     Up, Down, Left, Right - Moves the highlight to the
                             adjacent day.

     Home, End - Moves to the first or last day of the month.

     Page Down, Page Up - Decreases or increases the month by
                          one month, leaving the current day
                          number active.

       Arguments:

     dDate  - 'D' A legal Clipper date in any format.

     wT, wL - 'N' Relative window coordinates.

     wColor - 'C' Clipper colour string.

     wSType - 'N' TSDWIN shadow type.

     wFType - 'N' TSDWIN frame type

     lPaste - 'L' Logical to allow/disallow pasting ( SEE RETURN!! )

       Return:

     IF lPaste is TRUE, the return value is of date type, and returns
     the selected date.

     IF lPaste is false, the return value is a logical set to .T., to
     allow inclusion in WHENs and VALIDs.

       Example:

     LOCAL dGetTry := DATE(), GetList := {}

     SET KEY K_SH_F1 TO twCallDate()
     twInfoLine( -2, ".SHIFT-F1. for Calendar", "P" )

     DO WHILE .T.
         @ twRow( 4 ), twCol( 10 ) SAY "Get a Value" ;
                             GET dGetTry PICTURE "@D"
         READMODAL( GetList ); GetList := {}

         IF LASTKEY() == K_ESC
             EXIT
         ENDIF

     ENDDO

     twAMPop()

     SET KEY K_SH_F1 TO

     DO WHILE .T.
         @ twRow( 6 ), twCol( 10 ) SAY "Get a Value" ;
                             GET dGetTry PICTURE "@D" ;
                             WHEN twCalendar( @dGetTry, 10, 10, ;
                                 "gr+/gr,w+/b,,,n/w", 3, 5, .F. )
         READMODAL( GetList ); GetList := {}

         IF LASTKEY() == K_ESC
             EXIT
         ENDIF

     ENDDO

See Also: twDateInit() twCallDate()

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