A data-editing tool that displays multiple records in row-and-column format.

Syntax

[<oRef> =] new Browse(<container> [,<name expC>])

<oRef>

A variable or property—typically of <container>—in which to store a reference to the newly created Browse object.

<container>

The container—typically a Form object—to which you’re binding the Browse object.

<name expC>

An optional name for the Browse object. If not specified, the Browse class will auto-generate a name for the object.

Properties

The following tables list the properties, events, and methods of interest in the Browse class.

Property

Default

Description

alias

 

The table that is accessed

allowDrop

false

Whether dragged objects (normally a table or table field) can be dropped in the browse object

anchor

0 – None

How the Browse object is anchored in its container (0=None, 1=Bottom, 2=Top, 3=Left, 4=Right, 5=Center, 6=Container)

append

true

Whether rows can be added

baseClassName

BROWSE

Identifies the object as an instance of the Browse class

className

(BROWSE)

Identifies the object as an instance of a custom class. When no custom class exists, defaults to baseClassName

colorHighlight

WindowText
/Window

The color of the highlighted cell

colorNormal

WindowText
/Window

The color of all other cells

cuaTab

true

Whether pressing Tab follows CUA behavior and moves to next control, or moves to next cell

fields

 

The fields to display, and the options to apply to each field

frozenColumn

 

The name of the column inside which the cursor is confined.

lockedColumns

0

The number of columns that remain locked on the left side of the browse grid as it is scrolled horizontally.

modify

true

Whether the user can alter data

scrollBar

Auto

When a scroll bar appears for the Browse object (0=Off, 1=On, 2=Auto, 3=Disabled)

 

Event

Parameters

Description

onAppend

 

After a record is added to the table

onChange

 

After the user changes a value

onDragEnter

<left expN>
<top expN>
<type expC>
<name expC>

When the mouse enters the Browse display area during a Drag&Drop operation

onDragLeave

 

When the mouse leaves the Browse display area without having dropped an object

onDragOver

<left expN>
<top expN>
<type expC>
<name expC>

While the mouse drags an object over the Browse display area during a Drag&Drop operation

onDrop

<left expN>
<top expN>
<type expC>
<name expC>

When the mouse button is released over the Browse display area during a Drag&Drop operation

onNavigate

 

After the user moves to a different record

 

Method

Parameters

Description

copy( )

 

Copies selected text to the Windows Clipboard

cut( )

 

Cuts selected text and to the Windows Clipboard

keyboard( )

<expC>

Simulates typed user input to the Browse object

paste( )

 

Copies text from the Windows clipboard to the current cursor position

undo( )

 

Reverses the effects of the most recent cut( ), copy( ), or paste( ) action

 

The following table lists the common properties, events, and methods of the Browse class:

Property

 

Event

 

Method

before
borderStyle

dragEffect

enabled

fontBold

fontItalic

fontName

fontSize

form

height

helpFile

helpId

hWnd

id
left

mousePointer

name

pageno

parent

printable

speedTip

statusMessage

systemTheme
tabStop

top

visible

width

onDesignOpen
onDragBegin

onGotFocus

onHelp

onLeftDblClick

onLeftMouseDown

onLeftMouseUp

onLostFocus

onMiddleDblClick

onMiddleMouseDown
onMiddleMouseUp

onMouseMove

onOpen

onRightDblClick

onRightMouseDown

onRightMouseUp

when

drag( )
move( )

release( )

setFocus( )

Description

The Browse object is maintained for compatibility and is suitable only for viewing and editing tables open in work areas. For forms that use data objects, use a Grid object instead.

Two properties specify which table is displayed in the Browse object.

The view property of the parent form

The alias property of the browse object

You can specify individual fields to display with the fields property. For example, if the browse object's form is based on a query, you use fields to display fields from any of the query's tables. (You must specify a file with alias before you can use fields.)