xHarbour Reference Documentation > Function Reference xHarbour Developers Network  

Browse()

Browse a database file

Syntax

Browse( [<nTop>]   , ;
        [<nLeft>]  , ;
        [<nBottom>], ;
        [<nRight>]   ) --> lOk

Arguments

<nTop> and <nLeft>
Numeric values indicating the screen coordinates for the upper left corner of the Browse() window. The default value for <nTop> is 1 and for <nLeft> is zero.
<nBottom>
Numeric value indicating the bottom row screen coordinate. It defaults to MaxRow().
<nRight>
Numeric value indicating the right column screen coordinate. It defaults to MaxCol().

Return

The return value is .F. (false) if there is no database open in the work area, otherwise .T. (true) is returned.

Description

The Browse() function displays a simple database browser in a console window. Data is taken from the database open in the current work area, unless Browse() is used in an aliased expression.

The function provides for basic database navigation and editing using the following keys:

Table navigation with Browse()
KeyDescription
UpMove up one row (previous record)
DownMove down one row (next record)
PgUpMove to the previous screen
PgDnMove to the next screen
LeftMove one column to the left (previous field)
RightMove one column to the right (next field)
HomeMove to the leftmost visible column
EndMove to the rightmost visible column
 
Ctrl+HomeMove to the leftmost column
Ctrl+EndMove to the rightmost column
Ctrl+LeftPan one column to the left
Ctrl+RightPan one column to the right
Ctrl+PgUpMove to the top of the file
Ctrl+PgDnMove to the end of the file
 
EnterEdit current cell
DelToggles the deleted flag of current record.
EscTerminate Browse()

A status line is displayed on top of the Browse() window presenting the user the following information:

Browse() status information
DisplayDescription
Record ###/###Current record number / Total number of records.
<none>There are no records, the database is empty.
<new>A new record is about to be added.
<Deleted>Current record is deleted.
<bof>Top-of-file is reached.

A new record is automatically added when the user browses past the end of the database and edits a field on the new record.

Info

See also:DbEdit(), TBrowse(), TBrowseDB()
Category: Database functions , UI functions
Source:rtl\browse.prg
LIB:xhb.lib
DLL:xhbdll.dll

Example

// The example shows how to browse an indexed database.

   PROCEDURE Main

      USE Customer
      INDEX ON Upper(Lastname+Firstname) TO Cust01

      Browse()

      CLOSE Customer
   RETURN

Copyright © 2006-2007 xHarbour.com Inc. All rights reserved.
http://www.xHarbour.com
Created by docmaker.exe