Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- Grumpfish Library 3.2 - <b>dropbox()</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
DROPBOX()

    Surely you do not want to restrict yourself to exploding and
    shrinking boxes!  Toss in a drop-down box here and there to keep the
    users on their toes.  Syntax:

    DROPBOX(<top>, <left>, <bottom>, <right>, <type>, <delay>
           [,<shadow>, <title>, <crossbar>])

    Required Parameters

    <top>, <left>, <bottom>, <right> are integers representing the box
    coordinates.

    <type> is an integer between 1 and 6, and represents the type of box
    desired.  The choices are:

    Box Number            Box Type

        1                  Double
        2                  Single
        3            Double Horiz., Single Vert.
        4            Single Horiz., Double Vert.
        5                 Thick Line
        6                 No border

    <delay> is an integer numeric between 0 and 100, and is used to
    delay the box drawing effect.  The larger the delay, the longer the
    box drawing will take.  Once again, values between 1 and 20 are
    recommended, as is experimentation.

    Optional Parameters

    <shadow> is a logical value.  If True (.T.), a transparent drop
    shadow will be drawn with the box.  If False (.F.), no shadow will
    be drawn.  The default is no shadow.

    <title> is a character string to be used as the box title.  It will
    be centered on the top row of the box.

    <crossbar> is a variable of any type.  It affects the display of the
    box title. If you pass this parameter, the title will be centered on
    the row below the top row of the box, and a horizontal line (or
    crossbar) will be drawn on the row beneath that.  If you do not pass
    this parameter, the title will be centered and framed on the top row
    of the box.

    The box will be drawn from the top row down.

    Return Value

    DROPBOX() returns a character string, which contains the coordinates
    of the box, followed by the contents of that area of the screen
    prior to the box being drawn.  For example, an exploding box drawn
    at coordinates 0, 0, 24, 79 would return the string containing
    CHR(0) + CHR(0) + CHR(24) + CHR(79), followed by the contents of
    SAVESCREEN(0,0,24,79). This character string can be used by
    ByeByeBox() to redisplay that portion of the screen.

    Note that under Clipper 5, this function returns a five element
    array rather than a concatenated character string.  The structure
    of this array is { <top>, <left>, <bottom>, <right>, <contents>}.
    This makes performance brisker when using BYEBYEBOX().

    Sample usage

    buffer = DROPBOX(1, 60, 11, 79, 4, 10)      
    @ 5,63 SAY 'This box fell'                  
    @ 6,63 SAY 'like pennies'                   
    @ 7,63 SAY 'from heaven!'                   
    INKEY(0)                                    
    ByeByeBox(buffer)                           

    Unlike the exploding and shrinking boxes, drop-down boxes can be
    enjoyed by users with monochrome monitors.

    Clipper 5.0 Notes

    DROPBOX() and POPBOX() have been combined into one function,
    which is entitled POPNDROP().  The preprocessor makes this
    transparent to you. Therefore, you must put the following line at
    the top of any .PRG referring to DROPBOX() or POPBOX():

    #include "grump.ch"

See Also: BYEBYEBOX() EXBOX() POPBOX()

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