| 
       @...BUTTON  DEFINE BUTTON   Creates a Button control. 
     | 
    
      
             
      
     | 
  
A Button is a control the user can click to provide input to an application.
SYNTAX (TEXT BUTTON)
Standard Window:
@ <nRow> ,<nCol> BUTTON <ControlName> 
[ ID <nId> ]
[ OF | PARENT | DIALOG <ParentWindowName> ]
CAPTION <cCaption> 
[ ACTION | ONCLICK | ON CLICK <ActionProcedureName> | <bBlock> ]
[ WIDTH <nWidth> HEIGHT <nHeight> ] 
[ FONT <cFontName> SIZE <nFontSize> ]
[ BOLD ] [ ITALIC ] [ UNDERLINE ] [ STRIKEOUT ]
[ TOOLTIP <cToolTipText> ] 
[ FLAT ]
[ ON GOTFOCUS <OnGotFocusProcedur> | <bBlock> ]
[ ON LOSTFOCUS <OnLostFocusProcedure> | <bBlock> ]
[ NOTABSTOP ]
[ HELPID <nHelpId> ]
[ INVISIBLE ] 
[ MULTILINE ]
[ DEFAULT ] 
Dialog Window:
REDEFINE BUTTON <ControlName> 
ID <nId>
[ OF | PARENT | DIALOG <ParentWindowName> ]
CAPTION <cCaption> 
ACTION | ONCLICK | ON CLICK <ActionProcedureName> | <bBlock> 
[ FONT <cFontName> SIZE <nFontSize> ]
[ BOLD ] [ ITALIC ] [ UNDERLINE ] [ STRIKEOUT ]
[ TOOLTIP <cToolTipText> ] 
[ FLAT ]
[ ON GOTFOCUS <OnGotFocusProcedur> | <bBlock> ]
[ ON LOSTFOCUS <OnLostFocusProcedure> | <bBlock> ]
[ NOTABSTOP ]
[ HELPID <nHelpId> ]
[ HOTKEY <cKey> ] 
[ INVISIBLE ] 
[ MULTILINE ]
[ DEFAULT ] 
SYNTAX (PICTURE BUTTON)
Standard Window:
@ <nRow> ,<nCol> BUTTON <ButtonName> 
[ ID <nId> ]
[ OF | PARENT | DIALOG <ParentWindowName> ]
[ PICTURE <cPictureName> | <{cPictureName,cMaskName}> ] | [ ICON <icon> [ EXTRACT <nIconIndex> ]]
[ ACTION | ONCLICK | ON CLICK <ActionProcedureName> | <bBlock> ]
[ WIDTH <nWidth> HEIGHT <nHeight> ] 
[ TOOLTIP <cToolTipText> ] 
[ FLAT ] 
[ TRANSPARENT] 
[ NOXPSTYLE ]
[ ON GOTFOCUS <OnGotFocusProcedur> | <bBlock> ]
[ ON LOSTFOCUS <OnLostFocusProcedure> | <bBlock> ]
[ NOTABSTOP ]
[ HELPID <nHelpId> ]
[ INVISIBLE ] 
[ DEFAULT ] 
Dialog Window:
REDEFINE BUTTON <ButtonName> 
ID <nId>
[ OF | PARENT | DIALOG <ParentWindowName> ]
[ PICTURE <cPictureName> | <{cPictureName,cMaskName}> ] | [ ICON <icon> EXTRACT <nIconIndex> ]]
[ ACTION | ONCLICK | ON CLICK <ActionProcedureName> | <bBlock> ]
[ TOOLTIP <cToolTipText> ] 
[ FLAT ] 
[ TRANSPARENT] 
[ NOXPSTYLE ]
[ ON GOTFOCUS <OnGotFocusProcedur> | <bBlock> ]
[ ON LOSTFOCUS <OnLostFocusProcedure> | <bBlock> ]
[ NOTABSTOP ]
[ HELPID <nHelpId> ]
[ INVISIBLE ] 
[ DEFAULT ] 
Alternate Syntax:
DEFINE BUTTON <ButtonName>
[ ID <nId> ]
[ PARENT <ParentWindowName> ]
COL <nCol>
ROW <nRow>
WIDTH <nWidth> 
HEIGHT <nHeight> 
[ CAPTION <cCaption>]
     | [ PICTURE <cPictureName> | <{cPictureName,cMaskName}> ]
     | [ ICON <icon> ]
[ ACTION <ActionProcedureName> | <bBlock>
[ FONTNAME <cFontname> 
[ FONTSIZE <nFontsize> ]
[ FONTBOLD < .T. | .F.> ] 
[ FONTITALIC < .T. | .F.> ] 
[ FONTUNDERLINE < .T. | .F.> ] 
[ FONTSTRIKEOUT < .T. | .F.> ]
[ FONTCOLOR <aFontcolorRGBArray> ] 
[ ONGOTFOCUS <OnGotFocusProcedur> | <bBlock> ]
[ ONLOSTFOCUS <OnLostFocusProcedure> | <bBlock> ]
[ HELPID <nHelpId> ]
[ FLAT < .T. | .F.> ] 
[ NOTABSTOP < .T. | .F.>  ]
[ TRANSPARENT < .T. | .F.> ] 
END BUTTON
DESCRIPTION:
| 
     nRow, nCol  
     | 
    
     Position in the area of ??the window in pixels. 
     | 
| 
     nWidth, nHeigth 
     | 
    
     The desired size of the Button Control in pixels. 
     | 
| 
     nId 
     | 
    
     The ID identifier this Control in Dialog Window 
     | 
| 
     ButtonName 
     | 
    
     A reference to the Button Control 
     | 
| 
     ParentWindowName 
     | 
    
     A reference to the Parent Window. 
     | 
| 
     Caption 
     | 
    
     A text expressions for the Button. 
     | 
| 
     cFontname, nFontsize 
     | 
    
     A reference to the Font and size . 
     | 
| 
     OnGotFocusProcedure 
     | 
    
     An action to be performed when Button is focused. 
     | 
| 
     OnLostFocusProcedure 
     | 
    
     An action to be performed when Button is lost focused. 
     | 
| 
     AnctionProcedure 
     | 
    
     An action to be performed when Button is clicking. 
     | 
PROPERTIES:
| 
     Set / Gets enabled state of a button control 
     | |
| 
     Set / Gets visible a button control. 
     | |
| 
     Set / Gets row position of a button control. 
     | |
| 
     Set / Gets column position of a button control. 
     | |
| 
     Set / Gets width of a button control. 
     | |
| 
     Set / Gets height of a button control. 
     | |
| 
     Set / Gets caption of a button control. 
     | |
| 
     Set / Gets action of a button control.. 
     | |
| 
     Set / Gets button control's font name. 
     | |
| 
     Set / Gets button control's font size. 
     | |
| 
     Set / Gets button control's font bold property 
     | |
| 
     Set / Gets button control's font italic property 
     | |
| 
     Set / Gets button control's font underline property 
     | |
| 
     Set / Gets button control's font strikeout property 
     | |
| 
     Set / Gets button control's tooltip text. 
     | |
| 
     Set / Gets image name of a button control. 
     | |
| 
     Set / Gets icon name of a button control. 
     | |
| 
     Set / Gets user property 'Cargo' for button control 
     | |
| 
     Retrieves the name of a button control. 
     | |
| 
     ·   Parent (D) 
     | 
    
     Set the name as character identifier of the parent window.  
     | 
| 
     Set the numeric help topic identifier of the control. 
     | |
| 
     ·   Flat (D)  
     | 
    
     Specifies that the button is two-dimensional 
     | 
| 
     ·   NoTabStop (D)  
     | 
    
     Sets whether an element behavior can't receive focus and 
    participate in the tabbing sequence 
     | 
| 
     ·   Transparent (D) 
     | 
    
     | 
D: Available 
at control definition only
R: Read-Only
EVENTS:
| 
     An action to be performed when getting the focus 
     | |
| 
     An action to be performed when losing the focus. 
     | |
| 
     Action to be performed when generic clicking of the control 
     | 
METHODS:
| 
     Shows a button control 
     | |
| 
     Hides a button control 
     | |
| 
     Gives the focus to a button control 
     | |
| 
     Releases a button control from memory 
     | |
| 
     Save a 
    button control as BitMap file. 
     | 
Note:
Transparence in picture buttons requires 256 or less color depth bitmaps. 
PICTURE and ICON clause can not be used together.
Once created , image button must use .Picture (bitmaps) or .Icon (icons) property 
regarding to his definition. 
Params for PICTURE can be either Bitmap or array {Bitmap,Mask} - Bitmap Mask is 
used for display on disabled button
HINTS. As mask use 2-colors bitmaps only (white/black)
EXAMPLE: