| 
       @...BROWSE  DEFINE BROWSE  
    Creates a browse control  | 
    
      
             
      
     | 
  
SYNTAX
Standard Window:
[ @ <nRow> ,<nCol> 
] BROWSE <ControlName> 
[ ID <nId> ]
[ OF | PARENT | DIALOG <ParentWindowName> ]
WIDTH <nWidth> 
HEIGHT <nHeight> 
HEADERS <acHeaders> 
WIDTHS <anWidths> 
WORKAREA <WorkAreaName> 
FIELDS <acFields> 
[ VALUE <nValue> ] 
[ FONT <cFontname> SIZE <nFontsize> ]
[ BOLD ] [ ITALIC ] [ UNDERLINE ] [ STRIKEOUT ]
[ TOOLTIP <cToolTipText> ] 
[ BACKCOLOR <aBackColor> ]
[ DYNAMICBACKCOLOR <dynamicbackcolor> ] 
[ DYNAMICFORECOLOR <dynamicforecolor> ] 
[ FONTCOLOR <aFontColor> ]
[ ON GOTFOCUS <OnGotFocusProcedur> | <bBlock> ]
[ ON CHANGE <OnChangeProcedure> | <bBlock> ] 
[ ON LOSTFOCUS <OnGotFocusProcedur> | <bBlock> ]
[ [ ON DBLCLICK <OnDblClickProcedure> | <bBlock> ] | [ EDIT [ INPLACE ] ] [ APPEND  ]
[ INPUTITEMS <inputitems> ]
[ DISPLAYITEMS <displayitems> ]
[ ON HEADCLICK <aOnHeadClickProcedure> | <abBlock> ] 
[ WHEN <aWhenFields> ] 
[ VALID <abBlock> ] 
[ VALIDMESSAGES <acValidationMessages> ] 
[ READONLY <alReadOnlyFields> ] 
[ LOCK ] 
[ DELETE ] 
[ NOLINES ] 
[ IMAGE <acImageNames> ] 
[ JUSTIFY <anJustifyValue> ]
[ NOVSCROLL ]
[ HELPID <nHelpId> ]
[ BREAK ] 
[ HEADERIMAGE <aImageHeader> ]
[ NOTABSTOP ] 
Dialog Window:
REDEFINE BROWSE 
<ControlName> 
ID <nId> 
[ OF | PARENT | DIALOG <ParentWindowName> ]
HEADERS <acHeaders> 
WIDTHS <anWidths> 
WORKAREA <WorkAreaName> 
FIELDS <acFields> 
[ VALUE <nValue> ] 
[ FONT <cFontname> SIZE <nFontsize> ]
[ BOLD ] [ ITALIC ] [ UNDERLINE ] [ STRIKEOUT ]
[ TOOLTIP <cToolTipText> ] 
[ BACKCOLOR <aBackColor> ]
[ DYNAMICBACKCOLOR <dynamicbackcolor> ] 
[ DYNAMICFORECOLOR <dynamicforecolor> ] 
[ FONTCOLOR <aFontColor> ]
[ ON GOTFOCUS <OnGotFocusProcedur> | <bBlock> ]
[ ON CHANGE <OnChangeProcedure> | <bBlock> ] 
[ ON LOSTFOCUS <OnGotFocusProcedur> | <bBlock> ]
[ [ ON DBLCLICK <OnDblClickProcedure> | <bBlock> ] | [ EDIT  [ INPLACE ] ] [ APPEND ]
[ INPUTITEMS <inputitems> ]
[ DISPLAYITEMS <displayitems> ]
[ ON HEADCLICK <aOnHeadClickProcedure> | <abBlock> ] 
[ WHEN <aWhenFields> ] 
[ VALID <abBlock> ] 
[ VALIDMESSAGES <acValidationMessages> ] 
[ READONLY <alReadOnlyFields> ] 
[ LOCK ] 
[ DELETE ] 
[ NOLINES ] 
[ IMAGE <acImageNames> ] 
[ JUSTIFY <anJustifyValue> ]
[ NOVSCROLL ]
[ HELPID <nHelpId> ]
[ BREAK ] 
[ HEADERIMAGE <aImageHeader> ]
[ NOTABSTOP ]
Splitbox Version
BROWSE <ControlName>
[ OF <ParentWindowName> ]
[ WIDTH <nWidth> ]
[ HEIGHT <nHeight> ]
[ HEADERS <acHeaders> ]
[ WIDTHS <anWidths> ]
[ WORKAREA <WorkAreaName> ]
[ FIELDS <acFields> ]
[ VALUE <nValue> ] 
[ FONT <cFontname> SIZE <nFontsize> ]
[ BOLD ] [ ITALIC ] [ UNDERLINE ] [ STRIKEOUT ]
[ TOOLTIP <cToolTipText> ] 
[ BACKCOLOR <aBackColor> ]
[ DYNAMICBACKCOLOR <dynamicbackcolor> ] 
[ DYNAMICFORECOLOR <dynamicforecolor> ] 
[ FONTCOLOR <aFontColor> ]
[ ON GOTFOCUS <OnGotFocusProcedur> | <bBlock> ]
[ ON CHANGE <OnChangeProcedure> | <bBlock> ] 
[ ON LOSTFOCUS <OnGotFocusProcedur> | <bBlock> ]
[ [ ON DBLCLICK <OnDblClickProcedure> | <bBlock> ] | [ EDIT [ INPLACE ] ] [ APPEND  ]
[ INPUTITEMS <inputitems> ]
[ DISPLAYITEMS <displayitems> ]
[ ON HEADCLICK <aOnHeadClickProcedure> | <abBlock> ] 
[ WHEN <aWhenFields> ] 
[ VALID <abBlock> ] 
[ VALIDMESSAGES <acValidationMessages> ] 
[ READONLY <alReadOnlyFields> ] 
[ LOCK ] 
[ DELETE ] 
[ NOLINES ] 
[ IMAGE <acImageNames> ] 
[ JUSTIFY <anJustifyValue> ]
[ NOVSCROLL ]
[ HELPID <nHelpId> ]
[ BREAK ] 
[ HEADERIMAGE <aImageHeader> ]
[ NOTABSTOP ] 
Alternate Syntax:
DEFINE BROWSE 
<ControlName>
[ ID <nId> ]
[ PARENT <ParentWindowName> ]
COL <nCol>
ROW <nRow>
WIDTH <nWidth> 
HEIGHT <nHeight> 
HEADERS <acHeaders> 
WIDTHS <anWidths> 
FIELDS <acFields> 
[ VALUE <nValue> ] 
WORKAREA <WorkAreaName> 
[ FONTNAME <cFontname> 
[ FONTSIZE <nFontsize> ]
[ FONTBOLD < .T. | .F.> ] 
[ FONTITALIC < .T. | .F.> ] 
[ FONTUNDERLINE < .T. | .F.> ] 
[ FONTSTRIKEOUT < .T. | .F.> ]
[ TOOLTIP <cToolTipText> ] 
[ BACKCOLOR <aBackColor> ]
[ DYNAMICBACKCOLOR <dynamicbackcolor> ] 
[ DYNAMICFORECOLOR <dynamicforecolor> ] 
[ FONTCOLOR <aFontColor> ]
[ ONGOTFOCUS <OnGotFocusProcedure> | <bBlock> ]
[ ONCHANGE <OnChangeProcedure> | <bBlock> ] 
[ ONLOSTFOCUS <OnGotFocusProcedur> | <bBlock> ]
[ ONDBLCLICK <OnDblClickProcedure> | <bBlock> ] 
[ ALLOWEDIT < .T. | .F.> ]
[ INPLACEEDIT < .T. | .F.> ] 
[ ALLOWAPPEND < .T. | .F.> ]
[ INPUTITEMS <inputitems> ]
[ DISPLAYITEMS <displayitems> ]
[ ONHEADCLICK <aOnHeadClickProcedure> | <abBlock> ] 
[ WHEN <aWhenFields> ] 
[ VALID <abBlock> ] 
[ VALIDMESSAGES <acValidationMessages> ] 
[ READONLYFIELDS <alReadOnlyFields> ] 
[ LOCK < .T. | .F.>  ] 
[ ALLOWDELETE < .T. | .F.> ] 
[ NOLINES < .T. | .F.> ] 
[ IMAGE <acImageNames> ] 
[ JUSTIFY <anJustifyValue> ]
[ VSCROLLBAR < .T. | .F.> ]
[ HELPID <nHelpId> ]
[ BREAK < .T. | .F.> ] 
[ HEADERIMAGE <aImageHeader> ]
[ NOTABSTOP < .T. | .F.> ]
END BROWSE
DESCRIPTION:
| 
     nRow, nCol  
     | 
    
     Position in the area of ??the window in pixels. 
     | 
| 
     nWidth, nHeigth 
     | 
    
     The desired size of the Browse Control in pixels. 
     | 
| 
     nId 
     | 
    
     The ID identifier this Control in Dialog Window 
     | 
| 
     ControlName 
     | 
    
     A reference to the Browse Control 
     | 
| 
     ParentWindowName 
     | 
    
     A reference to the Parent Window. 
     | 
| 
     acHeaders 
     | 
    
     A list of text expressions for headers. 
     | 
| 
     anWidths 
     | 
    
     A list of sizes for each column in pixels. 
     | 
| 
     WorkAreaName 
     | 
    
     A reference to the Workarea. 
     | 
| 
     acFields 
     | 
    
     A list of text expressions to display as columns. 
     | 
| 
     cFontname, nFontsize 
     | 
    
     A reference to the Font and size the Font. 
     | 
| 
     OnChangeProcedure 
     | 
    
     An action to be performed when selecting a new row. 
     | 
| 
     OnGotFocusProcedure 
     | 
    
     An action to be performed when Browse is focused. 
     | 
| 
     OnLostFocusProcedure 
     | 
    
     An action to be performed when Browse is lost focused. 
     | 
| 
     OnDblClickProcedure 
     | 
    
     An action to be performed when Double Left clicking. 
     | 
| 
     abBlock 
     | 
    
     An expression to be validated when the Browse loses its focus. 
     | 
| 
     alReadOnlyFields 
     | 
    
     A list of logical expressions for the fields… 
     | 
| 
     acImageNames 
     | 
    
     Background color as a RGB number 
     | 
| 
     aOnHeadClickProcedure 
     | 
    
     A list of actions to be executed when a certain column header is clicked with the 
    mouse. 
     | 
| 
     aWhenFields 
     | 
    
     A Function or CodeBlock to evaluate indicating if the Browse is or not enable.. 
     | 
| 
     acValidationMessages 
     | 
    
     A list of associated messages of fields displayed when editable Field loses its 
    focus and is not valid. 
     | 
REMARKS:
· Value property selects a record by its number (RecNo())
· Value property returns selected record number (recNo())
· Browse control does not change the active work area
· Browse control does not change the record pointer in any area (nor change selection when it changes) when SET BROWSESYNC is OFF (the default)
· You can programmatically refresh it using refresh method.
· Variables called <MemVar>.<WorkAreaName>.<FieldName> are created for validation in browse editing window. You can use it in VALID array.
· Using APPEND clause you can add records to table associated with WORKAREA clause. The hotkey to add records is Alt+A. Append Clause Can't Be Used With Fields Not Belonging To Browse WorkArea
· Using DELETE clause allows to mark selected record for deletion pressing <Del> key
· The leftmost column in a browse control must be left aligned.
· The leftmost column in a browse control must be left aligned.
· When used in control definition, Header property must be loaded with a character array containing as elements as control columns.
· SET BROWSESYNC: When is set to ON, BROWSE control will move the record pointer in its workarea according to user selection or value property programmatic setting.
· Setting 'Value' to reccount()+1 (EOF) will cause that browse windows get empty (no records will be showed).
PROPERTIES:
| 
     Set / Gets browse value - selected record number  
     | |
| 
     Set / Gets enabled state of a browse control 
     | |
| 
     Set / Gets visible a browse control. 
     | |
| 
     Set / Gets row position of a browse control. 
     | |
| 
     Set / Gets column position of a browse control. 
     | |
| 
     Set / Gets width of a browse control. 
     | |
| 
     Set / Gets height of a browse control. 
     | |
| 
     Set / Gets header text in a browse control. 
     | |
| 
     Set / Gets header image in a browse control. 
     | |
| 
     Set / Gets browse control's font name. 
     | |
| 
     Set / Gets browse control's font size. 
     | |
| 
     Set / Gets browse control's font bold property 
     | |
| 
     Set / Gets browse control's font italic property 
     | |
| 
     Set / Gets browse control's font underline property 
     | |
| 
     Set / Gets browse control's font strikeout property 
     | |
| 
     Set / Gets browse control's tooltip text. 
     | |
| 
     Set / Gets the background color for text within the control 
     | |
| 
     Set / Gets the foreground color for text within the control 
     | |
| 
     Set / Gets user property 'Cargo' for browse control 
     | |
| 
     Retrieves the name of a browse control. 
     | |
| 
     ·   Parent (D) 
     | 
    
     Set the name as character identifier of the parent window.  
     | 
| 
     Set the numeric help topic identifier of the control. 
     | |
| 
     ·   Break (D) 
     | 
    
     Control passes to the statement that follows the terminated 
    statement.  
     | 
| 
     ·   Widths (D) 
     | 
    
     | 
| 
     ·   Fields (D) 
     | 
    
     | 
| 
     ·   WorkArea (D) 
     | 
    
     | 
| 
     ·   Valid (D) 
     | 
    
     | 
| 
     ·   ValidMessages (D) 
     | 
    
     | 
| 
     ·   ReadOnlyFields (D) 
     | 
    
     | 
| 
     ·   Lock (D) 
     | 
    
     | 
| 
     ·   AllowAppend 
     | 
    
     | 
| 
     ·   AllowDelete 
     | 
    
     | 
| 
     ·   AllowEdit 
     | 
    
     | 
| 
     ·   InPlaceEdit (D)  
     | 
    
     | 
| 
     ·   NoLines (D) 
     | 
    
     | 
| 
     ·   Image (D) 
     | 
    
     | 
| 
     ·   Justify (D) 
     | 
    
     | 
| 
     ·   VScrollBar (D) 
     | 
    
     | 
| 
     ·   When (D) 
     | 
    
     | 
| 
     ·   DynamicBackColor (D) 
     | 
    
     | 
| 
     ·   DynamicForeColor (D) 
     | 
    
     | 
| 
     ·   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:
| 
     An action to be performed when getting the focus 
     | |
| 
     An action to be performed when generic changing of the control 
     | |
| 
     An action to be performed when losing the focus. 
     | |
| 
     An action to be performed when Double Left clicking. 
     | |
| 
     A list of actions to be executed when a certain column header is clicked with the mouse 
     | 
METHODS:
| 
     Shows a gui object 
     | |
| 
     Hides a gui object 
     | |
| 
     Gives the focus to a control. 
     | |
| 
     Repaint a Control 
     | |
| 
     Releases a control from memory 
     | |
| 
     Set widths of a column to fit column contents text & column contents. 
     | |
| 
     Set widths of a column to fit column header text & column contents 
     | |
| 
     Set widths of all columns to fit each column contents  text & column contents. 
     | |
| 
     Set widths of all columns to fit each column header text & column contents. 
     | |
| 
     Update enables for Browse control 
     | |
| 
     Update disables for Browse control 
     | |
| 
     Save Control as BitMap file. 
     | 
EXAMPLE: