Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- GT_LIB v1.0 Reference Guide Release 1.0 - <b>allow + & - on date input</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
 Allow + & - on date input
------------------------------------------------------------------------------

 Syntax

        @ <row>, <col> GET <var> [...] DATEPLUS ;
                                                    [ADDDATE] [KEY <nkey] [....]

 Arguments:


 Returns:


 Description:

      Get reader to allow incementation and decrementation on a
      date field.

      Use as per example. ADDDATE & KEY are optional features.

                When the user is in the date field the use of the +
                and - keys will scroll the section of the date in
                which the cursor is located. If ADDDATE is NOT used
                each section will be independant of the other apart from
                the number of days in a month. If ADDDATE is used then
                ALL fields will be affected, eg start date 31/12/93
                press + key result 01/01/94. If KEY <nkey> is defined,
                nkey will be mapped to allow the user to toggle the
                knock-on effect.
      TAB & SHIFT_TAB will move between elements of the date

        NOTE
                Allows use of all normal Get functions eg VALID,WHEN but
                DATEPLUS ADDKEY KEY must be in that order and not separated
                by any other clause.
                Zero in any field is invalid.
 Examples:

        CLS
        @ 10,20 say "Enter date :"
                // Fully incremental date function
        @ 10,35 GET nDate DATEPLUS ADDDATE COLOR 'W+/R'
                // Non incremental date function + - only affect the
                // current section
        @ 10,35 GET nDate DATEPLUS COLOR 'W+/R'
                // Non incremental date function + - only affect the
                // current section but allow the user to toggle using
                // F10 key
        @ 10,35 GET nDate DATEPLUS KEY K_F10 COLOR 'W+/R'
        READ

 Header File: GT_Datep.ch

 Source: DATEPLUS.PRG

 Author:  Niall Scott

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