Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- CA-Clipper 5.3 . Guide To CA-Clipper - <b>@...get checkbox</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
 @...GET CHECKBOX
 Create a new check box Get object and display it to the screen
------------------------------------------------------------------------------
 Syntax

     @ <nRow>, <nCol>
        GET <lVar>
        CHECKBOX
           [CAPTION<cCaption>]
           [MESSAGE <cMessage>]
           [WHEN <lPreExpression>]
           [VALID <lPostExpression>]
           [COLOR <cColorString>]
           [FOCUS <fblock>
           [STATE <bBlock>]
           [STYLE <cStyle>]
           [SEND <msg>]
           [GUISEND <guimsg>]
           [BITMAPS <aBitmaps>]

 Arguments

     <nRow> and <nCol> specify the row and column coordinates for the
     check box and its caption.  Output which extends beyond the visible
     extent of the display is clipped and does not appear.

     GET <lVar> specifies the name of the variable associated with the
     GET.  <lVar> must contain a logical value.  A value of true (.T.)
     indicates that the check box is checked; otherwise, a value of false
     (.F.) indicates that it is not checked.

     CAPTION <cCaption> specifies a character string that concisely
     describes the GET on the screen.  Caption differs from the SAY argument
     in two ways.  The first is that the caption is displayed each time the
     GET is shown on the screen.  The other difference is that the caption,
     along with its screen position, is maintained within the Get object.
     This allows the GET to receive input when the mouse's left button is
     clicked and its cursor is on the caption.  By default, the caption
     appears to the left of the GET.  Use the Get object's capRow or capCol
     variable to change the screen position of the caption.

     When present, the & character specifies that the character
     immediately following it in the caption is the check box's accelerator
     key. The accelerator key provides a quick and convenient mechanism for
     the user to move input focus from one data input control to the check
     box.  The user performs the selection by pressing the Alt key in
     combination with an accelerator key.  The case of an accelerator key is
     ignored.

     MESSAGE <cMessage> specifies a character string that is displayed on
     the Get system's status bar line when the GET has input focus.
     Typically, it describes the anticipated contents or user response of the
     GET.  Refer to the READ command for details pertaining to the Get
     system's status bar.

     WHEN <lPreExpression> specifies an expression that must be satisfied
     before the cursor can enter the GET during a READ.  The expression can
     optionally be a code block.  The Get object is passed as a parameter to
     the code block.

     VALID <lPostExpression> specifies an expression that must be
     satisfied before the cursor can leave the GET during a READ.  The
     expression can optionally be a code block.  The Get object is passed as
     a parameter to the code block.

     COLOR <cColorString> defines the color settings for the check box.
     <cColorString> is a character expression containing exactly four color
     settings.

     CheckBox Color Attributes
     ------------------------------------------------------------------------
     Position     Applies To                             Default Value from
     in colorSpec                                        System Color Setting
     ------------------------------------------------------------------------
     1            The check box when it does not have      Unselected
                  input focus
     2            The check box when it has input focus    Enhanced
     3            The check box's caption                  Standard
     4            The check box caption's accelerator key  Background
     ------------------------------------------------------------------------

     Note:  In graphic mode, colorSpec positions 1 and 2 have no affect
     and are ignored.

     FOCUS <fblock> specifies a code block that is evaluated each time
     the check box receives focus.  The code block takes no implicit
     arguments.  Use the CheckBox:hasFocus instance variable to determine if
     the check box has focus.

     STATE <bBlock> specifies a code block that is evaluated each time
     the check box's state changes.  The code block takes no implicit
     arguments.  Use the CheckBox:buffer instance variable to determine if
     the check box is being checked or unchecked.  A value of true (.T.)
     indicates that it is being checked; otherwise, a value of false (.F.)
     indicates that it is being unchecked.

     STYLE <cStyle> specifies a character string that indicates the check
     box's delimiter characters.  The string must contain four characters.
     The first is the left delimiter.  Its default value is the left square
     bracket ([) character.  The second is the checked indicator.  Its
     default value is the square root
      () character.  The third is the unchecked indicator.  Its default is
     the  space character (" ").  The fourth character is the right
     delimiter.  Its default value is the right square bracket (]) character.

     Note:  The style clause is ignored in graphic mode.

     SEND <msg> sends the specified message to the Get object.  <msg> is
     sent before the GET is displayed.  Any message can be sent, including
     method calls and instance variable assignments.  Method calls must
     include parentheses even if no arguments are passed.

     GUISEND <guimsg> can be used to send a message (such as the
     Display() method) to a GUI object.  The GUI objects available in
     CA-Clipper are check boxes, list boxes, push buttons, and radio button
     groups.  To send a message to a non-GUI object, such as standard GETs
     and TBrowses, use the SEND clause.

     BITMAPS <aBitmaps>  contains an array of exactly two elements.  The
     first element of this array is the file name of the bitmap to be
     displayed when the check box is selected.  The second element of this
     array is the file name of the bitmap to be displayed when the check box
     is not selected.

     Drive and directory names are not allowed; the file name extension is
     required.  A bitmap file can be stored as a file on disk or in a bitmap
     library.  If stored as a file, the file must reside in the same
     directory as the application.  If stored in a bitmap library, the
     library must reside in the same directory as the application and it also
     must have the same name as the application with a .bml extension.

     CA-Clipper will search for the file name first and, if it is not found,
     search in the bitmap library second.  If no file is found either on disk
     or in the library, no bitmap will be displayed.

     This argument only affects applications running in graphic mode and is
     ignored in text mode.

 Examples

     .  This example demonstrates how to add a check box to a data entry screen:

        @ 5, 20 GET lReadOnly CHECKBOX

     .  This example demonstrates a check box that has a caption and a
        message:

        @ 5, 20 GET lReadOnly CHECKBOX ;
                CAPTION "&Read Only" ;
                MESSAGE "Check to open file for reading only"

     .  This example demonstrates a check box that uses the X
        character as the checked character instead of the square root
        character.

        @ 5, 20 GET lReadOnly CHECKBOX ;
                CAPTION "&Read Only" ;
                MESSAGE "Check to open file for reading only" ;
                STYLE "[X ]"

 Files   Libraries are CLIPPER.LIB and LLIBG.LIB.


See Also: @...GET Get class CheckBox class READ

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