TBrowseDB()

TBrowseDB()

Create a new TBrowse object to be used with database file

Syntax

      TBrowseDB( [<nTop>],  [<nLeft>],  [<nBottom>],  [<nRight>] ) --> oBrowse

Arguments

<nTop> coordinate for top row display.

<nLeft> coordinate for left column display.

<nBottom> coordinate for bottom row display.

<nRight> coordinate for right column display.

Returns

TBrowseDB() return new TBrowse object with the specified coordinate and a default :SkipBlock, :GoTopBlock and :GoBottomBlock to browse a database file.

Description

TBrowseDB() is a quick way to create a TBrowse object along with the minimal support needed to browse a database. Note that the returned TBrowse object contain no TBColumn objects and you need to add column for each field by your self.

Examples

    For a good example, look at the source code for Browse() function at src/rtl/browse.prg

Compliance

Harbour

Files

Library is core

Seealso

Browse(), TBColumn class, TBrowse class, TBrowseNew()

C5 TBColumn Class

Overview

 Provides column objects for TBrowse objects

Description

     A TBColumn object is a simple object containing the information needed
     to fully define one data column of a TBrowse object (see the TBrowse
     reference in this chapter).  TBColumn objects have no methods, only
     exported instance variables.

Examples

     .  This example is a code fragment that creates a TBrowse object
        and adds some TBColumn objects to it:

        USE Customer NEW
        //

        // Create a new TBrowse object
        objBrowse := TBrowseDB(1, 1, 23, 79)
        //

        // Create some new TBColumn objects and
        // add them to the TBrowse object
        objBrowse:addColumn(TBColumnNew( "Customer", ;
              {|| Customer->Name} ))
        objBrowse:addColumn(TBColumnNew( "Address", ;
              {|| Customer->Address} ))
        objBrowse:addColumn(TBColumnNew( "City", ;
              {|| Customer->City} ))
        .
        . <statements to actually browse the data>
        .
        CLOSE Customer

        For more information on TBrowse, refer to the Introduction to TBrowse
        chapter in the Programming and Utilitites guide.  For a fully
        operational example of a TBrowse object, see also TbDemo.prg located
        in \CLIPPER5\SOURCE\SAMPLE.

Class Function
     TBColumnNew()   Create a new TBColumn object

     TBColumnNew(<cHeading>, <bBlock>) --> objTBColumn

        Returns a new TBColumn object with the specified heading and data
        retrieval block.  Other elements of the TBColumn object can be
        assigned directly using the syntax for assigning exported instance
        variables.

More ...

See Also: BROWSE()* DBEDIT()* TBrowse