@...BROWSE / DEFINE BROWSE
Creates a browse control
Standard Syntax (xBase Style):
@ <nRow> ,<nCol>
BROWSE <ControlName>
[ OF | PARENT <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> ]
[ DYNAMICBACKCOLOR <aDynamicBackColor> ]
[ DYNAMICFORECOLOR <aDynamicBackColor> ]
[ INPUTMASK <acInputMask> ]
[ FORMAT <acFormat> ]
[ INPUTITEMS <aInputItems> ]
[ DISPLAYITEMS <aDisplayItems> ]
[ BACKCOLOR <aBackColor> ]
[ FONTCOLOR <aFontColor> ]
[ ON GOTFOCUS <OnGotFocusProcedur> | <bBlock> ]
[ ON CHANGE <OnChangeProcedure> | <bBlock> ]
[ ON LOSTFOCUS <OnGotFocusProcedur> | <bBlock> ]
[ [ ON DBLCLICK <OnDblClickProcedure> | <bBlock> ] | [ EDIT ] [ APPEND ] ]
[ ON HEADCLICK <abBlock> ]
[ WHEN <abBlock> ]
[ VALID <abBlock> ]
[ VALIDMESSAGES <acValidationMessages> ]
[ READONLY <alReadOnlyFields> ]
[ LOCK ]
[ DELETE ]
[ NOLINES ]
[ IMAGE <acImageNames> ]
[ JUSTIFY <anJustifyValue> ]
[ NOVSCROLL ]
[ HELPID <nHelpId> ]
[ BREAK ]
[ HEADERIMAGES <acHeaderImages> ]
Alternate Syntax:
DEFINE BROWSE <ControlName>
PARENT <xcValue>
WIDTH <nValue>
HEIGHT <nValue>
HEADERS <acValue>
WIDTHS <anValue>
WORKAREA <xcValue>
FIELDS <acValue>
VALUE <nValue>
FONTNAME <cValue>
FONTSIZE <nValue>
FONTBOLD <lValue>
FONTITALIC <lValue>
FONTUNDERLINE <lValue>
FONTSTRIKEOUT <lValue>
TOOLTIP <cValue>
DYNAMICBACKCOLOR <abValue>
DYNAMICFORECOLOR <abValue>
INPUTMASK <acValue> ]
FORMAT <acValues> ]
INPUTITEMS <aaValues
DISPLAYITEMS <aaValues>
BACKCOLOR <anValue>
FONTCOLOR <anValues
ONGOTFOCUS <ActionProcedure>
ONCHANGE <ActionProcedure
ONLOSTFOCUS <ActionProcedure
ONDBLCLICK <ActionProcedure>
ALLWEDIT <lvalue>
ALLWEAPPEND <lvalue>
ON HEADCLICK <abBlock>
WHEN <abBlock>
VALID <abBlock>
VALIDMESSAGES <acValues>
READONLY <anValues>
LOCK <lValue>
ALLOWDELETE <lValue>
LINES <lValue>
IMAGE <acValue>
JUSTIFY <anJustifyValue>
VSCROLLBAR <lValue>
HELPID <nValue>
BREAK <lValue>
HEADERIMAGES <acValue>
END BROWSE
Properties:
- Value
- Enabled
- Visible
- Row
- Col
- Width
- Height
- HeaderImages (nColumnNumber)
- FontName
- FontSize
- FontBold
- ToolTip
- Name (R)
- Parent (D)
- Widths (D)
- Fields (D)
- WorkArea (D)
- Valid (D)
- ValidMessages (D)
- ReadOnlyFields (D)
- Lock (D)
- Lines (D)
- Image (D)
- Justify (D)
- VScrollBar (D)
- HelpId (D)
- When (D)
- DynamicBackColor (D)
- DynamicForeColor (D)
- InputMask (D)
- Format (D)
D: Available at control definition only
R: Read-Only
Events:
- OnChange
Methods:
- Show
- Hide
- SetFocus
- Refresh
- Release
Hints:
- 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 programatically 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.
- 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 programatic setting.
- Setting 'Value' to reccount()+1 (EOF) will cause that browse windows
get empty (no records will be showed).
- Vscrollbar can't be used with splitbox child browse.
- 'InputItems' property allows to control data input in the control.
This property is an array (one element for each browse column).
each element (if specified) must be a two dimensional array. The
first column in the array must contain the data to be shown to the user.
the second column must contain the data to be stored in the table (ID)
for each text row in the array.
- 'DisplayItems' property allows to control data display in the control.
This property is an array (one element for each browse column).
each element (if specified) must be a two dimensional array.
the first column in the array must contain the text to be shown to the
user. The second column must contain the ID for each array row.
the array will be searched for a corresponding ID in the table to show
the right text in each cell. If no correspondence is found, the cell
will be blank.