@...CHECKBOX
DEFINE CHECKBOX
Creates a CheckButton control.
  

A check box consists of a square box and application-defined text (label), that indicates a choice the user can make by selecting the button.

SYNTAX

Standard Window:

@ <nRow> ,<nCol> CHECKBOX<ControlName>
[ ID <
nId> ]
[ OF | PARENT | DIALOG <
ParentWindowName> ]
CAPTION<
cCaption>
[ WIDTH <
nWidth> ]
[ HEIGHT <nHeight> ]
[ FIELD <
cField> ]
[ VALUE <
lValue> ]
[ FONT <
cFontName> SIZE <nFontSize> ]
[ BOLD ] [ ITALIC ] [ UNDERLINE ] [ STRIKEOUT ]
[ TOOLTIP <
cToolTipText> ]
[ BACKCOLOR <
anBackColor> ]
[ FONTCOLOR <
anFontColor> ]
[ ON GOTFOCUS <
OnGotFocusProcedure> | <bBlock> ]
[ ON CHANGE <
OnChangeProcedure> | <bBlock> ]
[ ON LOSTFOCUS <
OnLostFocusProcedure> | <bBlock> ]
[ ON ENTER <
OnEnterProcedure> | <bBlock> ]
[ TRANSPARENT ]
[ MULTILINE ]
[ HELPID <
nHelpId> ]
[ INVISIBLE ]
[ NOTABSTOP ]
[ LEFTJUSTIFY ]
[ THREESTATE ]
[ AUTOSIZE ]

[ ON INIT <
bInit> ]

Dialog Window:

REDEFINE CHECKBOX<ControlName>
ID <
nId>
[ OF | PARENT | DIALOG <
ParentWindowName> ]
[ CAPTION<
cCaption> ]
[ FIELD <
cField> ]
[ VALUE <
lValue> ]
[ FONT <
cFontName> SIZE <nFontSize> ]
[ BOLD ] [ ITALIC ] [ UNDERLINE ] [ STRIKEOUT ]
[ TOOLTIP <
cToolTipText> ]
[ BACKCOLOR <
anBackColor> ]
[ FONTCOLOR <
anFontColor> ]
[ ON GOTFOCUS <
OnGotFocusProcedure> | <bBlock> ]
[ ON CHANGE <
OnChangeProcedure> | <bBlock> ]
[ ON LOSTFOCUS <
OnLostFocusProcedure> | <bBlock> ]
[ ON ENTER <
OnEnterProcedure> | <bBlock> ]
[ TRANSPARENT ]

[ MULTILINE ]
[ HELPID <
nHelpId> ]
[ INVISIBLE ]
[ NOTABSTOP ]
[ LEFTJUSTIFY ]
[ THREESTATE ]

[ ON INIT <
bInit> ]

Alternate Syntax:

DEFINE CHECKBOX <ControlName>

[ ID <nId> ]
[ PARENT <
ParentWindowName> ]
COL <
nCol>
ROW <
nRow>
WIDTH <
nWidth>
HEIGHT <
nHeight>
CAPTION<
cCaption>
[ FIELD <
cField> ]
[ VALUE <
lValue> ]
[ FONTNAME <
cFontName> ]
[ FONTSIZE <
nFontSize> ]
[ FONTBOLD < .T. | .F.> ]
[ FONTITALIC < .T. | .F.> ]
[ FONTUNDERLINE < .T. | .F.> ]
[ FONTSTRIKEOUT < .T. | .F.> ]
[ TOOLTIP <
cToolTipText> ]
[ BACKCOLOR <
anBackColor> ]
[ FONTCOLOR <
anFontColor> ]
[ ONGOTFOCUS <
OnGotFocusProcedure> | <bBlock> ]
[ ONCHANGE <
OnChangeProcedure> | <bBlock> ]
[ ONLOSTFOCUS <
OnLostFocusProcedure> | <bBlock> ]
[ ONENTER <
OnEnterProcedure> | <bBlock> ]
[ HELPID <
nHelpId> ]
[ TRANSPARENT < .T. | .F.> ]
[ MULTILINE < .T. | .F.> ]
[ INVISIBLE < .T. | .F.> ]
[ NOTABSTOP < .T. | .F.> ]
[ LEFTJUSTIFY < .T. | .F.> ]
[ THREESTATE < .T. | .F.> ]

END CHECKBOX


DESCRIPTION:
nRow, nCol
Position in the area of ??the window in pixels.
nWidth, nHeight
The desired size of the CheckBox Control in pixels.
nId
The ID identifier this Control in Dialog Window
ControlName
A reference to the CheckBox Control
ParentWindowName
A reference to the Parent Window.
nHelpId
The help topic identifier for this Control
cCaption
Text for the CheckBox control
cField
Specifies a Field Name
lValue
A startup value for the CheckBox control
cFontName, nFontSize
A reference to the Font and size the Font.
cToolTipText
Specifies the Text for the ToolTip
anBackColor
Specifies the Background Color
anFontColor
Specifies the Font Color
OnGotFocusProcedure
An action to be performed when CheckBox is focused.
OnChangeProcedure
An action to be performed when CheckBox is changed
OnLostFocusProcedure
An action to be performed when CheckBox Lost Focused.
OnEnterProcedure
An action to be performed when CheckBox is ENTER
 
 
TRANSPARENT
Specifies that the background of a control should be transparent
INVISIBLE
The visibility property specifies whether or not a control is visible
NOTABSTOP
Stop the control to receive focus and participate in the tabbing sequence
THREESTATE
Specifies that CheckBox control with have THREE state
(see Notes below for more information)
AUTOSIZE
Specifies that the width if the checkbox will be changed to fit the length of the CheckButton Caption
LEFTJUSTIFY
Specifies that we want to put the Caption on the Left Side of the CheckButton
MULTILINE
specifies we want to display multiple line in the CheckButton control


PROPERTIES:

·   Value
Set / Gets CheckBox value.
·   Enabled
Set / Gets enabled state of a CheckBox control
·   Visible          
Set / Gets visible a CheckBox control.
·   Row
Set / Gets row position of a CheckBox control.
·   Col   
Set / Gets column position of a CheckBox control.
·   Width
Set / Gets width of a CheckBox control.
·   Height
Set / Gets height of a CheckBox control.
·   Caption
Set / Gets caption of a CheckBox control.
·   FontName
Set / Gets CheckBox control's font name.
·   FontSize
Set / Gets CheckBox control's font size.
·   FontBold
Set / Gets CheckBox control's font bold property
·   FontItalic
Set / Gets CheckBox control's font italic property
Set / Gets CheckBox control's font underline property
Set / Gets CheckBox control's font strikeout property
·   ToolTip
Set / Gets CheckBox control's tooltip text.
·   FontColor
Set / Gets the foreground color for text within the CheckBox
·   BackColor
Set / Gets the background color for text within the CheckBox
Set / Gets t the background of a control transparent
·   Cargo
Set / Gets user property 'Cargo' for CheckBox control
·   Name (R)
Retrieves the name of a CheckBox control.
·   Parent(D)
Set the name as character identifier of the parent window.
·   Field(D)
Links CheckBox controls  to a table field.
·   HelpId (D)
Set the numeric help topic identifier of the control.
·   NoTabStop(D)
Sets whether an element behavior can't receive focus and participate in the tabbing sequence

Available at control definition only
R: Read-Only

EVENTS:

 

·   OnGotFocus
Action to be performed when getting the focus
·   OnChange
Action to be performed when generic changing of the control
Action to be performed when losing the focus.
·   OnEnter
Action to be performed when pressing a Enter key

METHODS:
·   Show
Shows a CheckBox control
·   Hide
Hides a CheckBox control
·   Redraw
Redraw a Control
·   SetFocus
Gives the focus to a CheckBox control
·   Release
Releases a CheckBox control from memory
·   Refresh
Repaint a Control
·   Save
Save data for Control CheckBox
·   SaveAs
Save a CheckBox control as BitMap file.


NOTES:

When using THREESTATE Checkbox the Value are  NIL, .T. and .F.

EXAMPLE:

see demos in :
\Samples\Basic\CheckBox
\Samples\Basic\CheckBox_Grid
\Samples\Basic\CheckBox_ThreeState

and sample in Chapter:
Getting Logical