Function TBrowseDb() Foundation

Generates an object of the TBrowse class including navigation code blocks. This function is deprecated.

Syntax
TBrowseDb( [<nTop>]   , ;
           [<nLeft>]  , ;
           [<nBottom>], ;
           [<nRight>]   ) --> oTBrowse
Parameters
<nTop>
<nTop> is an integer numeric value specifying the top screen row at which the TBrowse object is displayed. The four arguments <nTop>, <nLeft>, <nBottom> and <nRight> specify the screen coordinates for the object. The default value for <nTop> is zero.
<nLeft>
<nLeft> is an integer numeric value specifying the left screen column of the TBrowse object display. The default value is zero.
<nBottom>
<nBottom> is an integer numeric value specifying the bottom screen row of the TBrowse object display. The default value is MaxRow().
<nRight>
<nRight> is an integer numeric value specifying the right screen column of the TBrowse object display. The default value is MaxCol().
Return

The return value of TBrowseDb() is a new TBrowse object with three default navigation code blocks.

Description

The function TBrowseDb() creates an object of the TBrowse class which includes three code blocks for navigating a data file (DBF file). The code blocks are assigned to the instance variables :goTopBlock, :goBottomBlock and :skipBlock. They execute the file operations GO TOP, GO BOTTOM and SKIP (see example).

TBrowseDb() creates a TBrowse object with default behavior for displaying fields in the current work area and allows navigation of the data record pointer using the cursor keys. The TBrowse object displays data from the file. TBColumn objects must be attached to the TBrowse object to manage the data of each single field (column) in the work area.

More information can be found with the class TBrowse.

Examples
TBrowseDb()
// The example compares the function call with the 
// equivalent code using object oriented syntax. 
// For programming with TBrowse objects see the 
// example with the TBrowse class. 

PROCEDURE Main 
   LOCAL oTBrowse 
                                   // function call 
   oTBrowse := TBrowseDb( 5, 10, 19, 69 ) 

                                   // message to class object 
   oTBrowse := TBrowse():new( 5, 10, 19, 69 ) 
                                   // default code blocks 
   oTbrowse:goTopBlock    := {|| DbGoTop() } 
   oTbrowse:goBottomBlock := {|| DbGoBottom() } 
   oTbrowse:skipBlock     := {|nSkip| DbSkipper(nSkip) } 

RETURN 
Feedback

If you see anything in the documentation that is not correct, does not match your experience with the particular feature or requires further clarification, please use this form to report a documentation issue.