@...CHECKBUTTON
DEFINE CHECKBUTTON 
Creates a CheckButton control.
  

A CheckButton consists of a box and bitmap or icon, that indicates a choice the user can make by selecting the button.

SYNTAX

Standard Window:

@ <nRow> ,<nCol> CHECKBUTTON <ControlName>
[ ID <
nId> ]
[ OF | PARENT | DIALOG <
ParentWindowName> ]
CAPTION <
cCaption>
[ WIDTH <
nWidth>] [ HEIGHT <nHeight> ]
[ VALUE <
lValue> ]
[ FONT <
cFontName> SIZE <nFontSize> ]
[ BOLD ] [ ITALIC ] [ UNDERLINE ] [ STRIKEOUT ]
[ TOOLTIP <
cToolTipText> ]
[ ON GOTFOCUS <
OnGotFocusProcedure> | <bBlock> ]
[ ON CHANGE <
OnChangeProcedure> | <bBlock> ]
[ ON LOSTFOCUS <
OnLostFocusProcedure> | <bBlock> ]
[ HELPID <
nHelpId> ]
[ INVISIBLE ]
[ NOTABSTOP ]

Dialog Window:

REDEFINE CHECKBUTTON <ControlName>
ID <
nId>
[ OF | PARENT | DIALOG <
ParentWindowName> ]
CAPTION <
cCaption>
[ VALUE <
lValue> ]
[ FONT <
cFontName> SIZE <nFontSize> ]
[ BOLD ] [ ITALIC ] [ UNDERLINE ] [ STRIKEOUT ]
[ TOOLTIP <
cToolTipText> ]
[ ON GOTFOCUS <
OnGotFocusProcedure> | <bBlock> ]
[ ON CHANGE <
OnChangeProcedure> | <bBlock> ]
[ ON LOSTFOCUS <
OnLostFocusProcedure> | <bBlock> ]
[ HELPID <
nHelpId> ]
[ INVISIBLE ]
[ NOTABSTOP ]

Bitmap CheckButton:

Standard Window:

@ <nRow> ,<nCol> CHECKBUTTON <ControlName>
[ ID <
nId> ]
[ OF | PARENT | DIALOG <
ParentWindowName> ]
PICTURE <
cPictureName>
[ WIDTH <
nWidth>] [ HEIGHT <nHeight> ]
[ VALUE <
lValue> ]
[ TOOLTIP <
cToolTipText> ]
[ ON GOTFOCUS <
OnGotFocusProcedure> | <bBlock> ]
[ ON CHANGE <
OnChangeProcedure> | <bBlock> ]
[ ON LOSTFOCUS <
OnLostFocusProcedure> | <bBlock> ]
[ HELPID <
nHelpId> ]
[ INVISIBLE ]
[ NOTABSTOP ]

Dialog Window:

REDEFINE CHECKBUTTON <ControlName>
ID <
nId>
[ OF | PARENT | DIALOG <
ParentWindowName> ]
PICTURE <
cPictureName>
[ VALUE <
lValue> ]
[ TOOLTIP <
cToolTipText> ]
[ ON GOTFOCUS <
OnGotFocusProcedure> | <bBlock> ]
[ ON CHANGE <
OnChangeProcedure> | <bBlock> ]
[ ON LOSTFOCUS <
OnLostFocusProcedure> | <bBlock> ]
[ HELPID <
nHelpId> ]
[ INVISIBLE ]
[ NOTABSTOP ]

Alternate Syntax:

DEFINE CHECKBUTTON <Controlname>

[ ID <nId> ]
[ PARENT <
ParentWindowName> ]
[ COL <
nCol> ]
[ ROW <
nRow> ]
CAPTION <
cCaption>
[ WIDTH <
nWidth>]
[ HEIGHT <
nHeight> ]
[ VALUE <
lValue> ]
[ FONTNAME <
cFontName> ]
[ FONTSIZE <
nFontSize> ]
[ FONTBOLD < .T. | .F.> ]
[ FONTITALIC < .T. | .F.> ]
[ FONTUNDERLINE < .T. | .F.> ]
[ FONTSTRIKEOUT < .T. | .F.> ]
[ TOOLTIP <
cToolTipText> ]
[ ONGOTFOCUS <
OnGotFocusProcedure> | <bBlock> ]
[ ONCHANGE <
OnChangeProcedure> | <bBlock> ]
[ ONLOSTFOCUS <
OnLostFocusProcedure> | <bBlock> ]
[ HELPID <
nHelpId> ]
[ INVISIBLE < .T. | .F.> ]
[ NOTABTOP < .T. | .F.>  ]

END CHECKBUTTON

Bitmap CheckButton:

DEFINE CHECKBUTTON <Controlname>

[ ID <nId> ]
[ PARENT <
ParentWindowName> ]
[ COL <
nCol> ]
[ ROW <
nRow> ]
PICTURE <
cPictureName>
[ WIDTH <
nWidth>]
[ HEIGHT <
nHeight> ]
[ VALUE <
lValue> ]
[ FONTNAME <
cFontName> ]
[ FONTSIZE <
nFontSize> ]
[ FONTBOLD < .T. | .F.> ]
[ FONTITALIC < .T. | .F.> ]
[ FONTUNDERLINE < .T. | .F.> ]
[ FONTSTRIKEOUT < .T. | .F.> ]
[ TOOLTIP <
cToolTipText> ]
[ ONGOTFOCUS <
OnGotFocusProcedure> | <bBlock> ]
[ ONCHANGE <
OnChangeProcedure> | <bBlock> ]
[ ONLOSTFOCUS <
OnLostFocusProcedure> | <bBlock> ]
[ HELPID <
nHelpId> ]
[ INVISIBLE < .T. | .F.> ]
[ NOTABTOP < .T. | .F.>  ]

END CHECKBUTTON


DESCRIPTION:
nRow, nCol
Position in the area of ??the window in pixels.
nWidth, nHeight
The desired size of the CheckButton Control in pixels.
nId
The ID identifier this Control in Dialog Window
ControlName
A reference to the CheckButton Control
ParentWindowName
A reference to the Parent Window.
nHelpId
The help topic identifier for this Control
lValue
Specifies the starting value of the CheckButton control
cToolTipText
Specifies the Text for the ToolTip
OnGotFocusProcedure
An action to be performed when CheckButton Got Focus
OnChangeProcedure
An action to be performed when CheckButton Change
OnLostFocusProcedure
An action to be performed when CheckButton Lost Focus
 
 
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


PROPERTIES:

·   Value
Set / Gets CheckButton value.
·   Enabled
Set / Gets enabled state of a CheckButton control
·   Visible          
Set / Gets visible a CheckButton control.
·   Row
Set / Gets row position of a CheckButton control.
·   Col   
Set / Gets column position of a CheckButton control.
·   Width
Set / Gets width of a CheckButton control.
·   Height
Set / Gets height of a CheckButton control.
·   Caption
Set / Gets caption of a CheckButton control.
·   FontName
Set / Gets CheckButton control's font name.
·   FontSize
Set / Gets CheckButton control's font size.
·   FontBold
Set / Gets CheckButton control's font bold property
·   FontItalic
Set / Gets CheckButton control's font italic property
Set / Gets CheckButton control's font underline property
Set / Gets CheckButton control's font strikeout property
·   ToolTip
Set / Gets CheckButton control's tooltip text.
·   Cargo
Set / Gets user property 'Cargo' for CheckButton control
·   Name (R)
Retrieves the name of a CheckButton control.
·   Parent(D)
Set the name as character identifier of the parent window.
·   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

D: 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.

METHODS:

·   Show
Shows a CheckButton control
·   Hide
Hides a CheckButton control
·   SetFocus
Gives the focus to a CheckButton control
·   Release
Releases a CheckButton control from memory
·   SaveAs
Save a CheckButton control as BitMap file.

Note: Transparence in picture buttons requires 256 or less color depth bitmaps.

EXAMPLE:

see Sample in Chapter:
Button + CheckBox = CheckButton