Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- TSDWIN: Clipper 5.0 Interface Library - Norton Guide http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]

 twBRGetBrowse()
 ----------------------------------------------------------------------------

     Obtain a reference to the current browse object created under the
     TSDWIN twBRBrowse() function. This function is useful when
     operating on the current browse with an ActionKey function.

     An important benefit from using twBRBrowse() is that
     twBRGetBrowse() gives you access to the entire cargo structure of
     the browse. If you delete or add records to the database, there
     are some things you should do in order that the browse continues
     to work as expected. You must change the internals to reflect the
     new record  position in the index, for instance, when using
     scroll bars to allow the button position to be updated correctly.
     See tw_NtxPos().

     When using actionkeys or mouse hot spots, it is very common to
     obtain a reference to the browse with twBRGetBrowse() and modify
     the browse behaviour from outside. This cargo structure is
     provided in order that the programmer has complete control over
     the browse structure at all times, even when the browse is active.

     An example might be to use a PreRun block to define column
     ColorBlocks or use a different title  color for the browse than
     the default text colour, eg.,

     bPreRun := {|x,y| twTitle( "Title", "n/w",
                                   "T", "C" ),;
                  x := twBRGetBrowse(), ;
                  y := x:GETCOLUMN( 2 ),;
                  y:colorblock := {|| { 5, 2 } },;
                  y := x:GETCOLUMN( 3 ),;
                  y:colorblock := {|| ;
                  IIF( Part->POnHand > 500, ;
                       { 1, 2 }, ;
                       IIF( Part->POnHand < 100, ;
                       { 7,  2 }, { 6, 2 } )) },;
                  x:ColPos := 1 }


     NOTE: Some of the settings in the above example may be set up in
           the column definitions.

        Browse Cargo Structures:

               Browse Cargo

     oDB:cargo[ 1 ]                  oDB:cargo[ 8 ][ 4 ]
         Allow Edits                     Horizontal Scroll Bar
         .BREdit                                Right
                                         .BRHBarRight
     oDB:cargo[ 2 ]
         Scope Block                 oDB:cargo[ 8 ][ 5 ]
         .BRScopeBlock                   Horizontal Scroll Bar
                                                Top
     oDB:cargo[ 3 ]                      .BRHBarColor
         Top Key for Scope
         .BRTopKey                   oDB:cargo[ 8 ][ 6 ]
                                         Horizontal Scroll Bar
     oDB:cargo[ 4 ]                             Position
         Width of Frozen Columns         .BRHBarPos
         .BRFrozenWidth
                                     oDB:cargo[ 8 ][ 7 ]
     oDB:cargo[ 5 ]                      Horizontal Scroll Bar
         Current Record                         Orientation
         .BRCurrent                      .BRHBarOrient

     oDB:cargo[ 6 ]                  oDB:cargo[ 8 ][ 8 ]
         Number of Records in            Horizontal Handle for
                   Scope                        Mouse Hot Spot
         .BRLength                       .BRHBarHot

     oDB:cargo[ 7 ]                  oDB:cargo[ 9 ]
         Vertical Scroll Bar             {} Width to end of column
         .BRVScrollBar                   .RATotWidth

     oDB:cargo[ 7 ][ 1 ]             oDB:cargo[ 9 ][ 1 ]
         Vertical Scroll Bar             0, Start Column reference
                Top
         .BRVBarTop                  oDB:cargo[ 9 ][ i + 1 ]
                                         Column(i) cumulative width to
     oDB:cargo[ 7 ][ 2 ]                 end of separator.
         Vertical Scroll Bar
                Left                 oDB:cargo[ 10 ]
         .BRVBarLeft                     Header Depth
                                         .BRHeadDepth
     oDB:cargo[ 7 ][ 3 ]
         Vertical Scroll Bar         oDB:cargo[ 11 ]
                Bottom                   Allow Mouse
         .BRVBarBottom                   .BRMouse

     oDB:cargo[ 7 ][ 4 ]             oDB:cargo[ 12 ]
         Vertical Scroll Bar             Calling Procedure
                Right                    .BRCaller
         .BRVBarRight
                                     oDB:cargo[ 13 ]
     oDB:cargo[ 7 ][ 5 ]                 Calling Procedure
         Vertical Scroll Bar                  Line Number
                Colour                   .BRCallerLine
         .BRVBarColor
                                     oDB:cargo[ 14 ]
     oDB:cargo[ 7 ][ 6 ]               Array for seek searches
         Vertical Scroll Bar          .BRSeekArray
                Position
         .BRVBarPos                  oDB:cargo[ 14 ][ 1 ]
                                        Column Number for Searches
     oDB:cargo[ 7 ][ 7 ]               .BRSeekPos
         Vertical Scroll
            Bar Orientation          oDB:cargo[ 14 ][ 2 ]
         .BRVBarOrient                 Search Exception Colour
                                       .BRSeekClr
     oDB:cargo[ 7 ][ 8 ]
         Vertical Handle for         oDB:cargo[ 14 ][ 3 ]
            Mouse Hot Spot              Search block
         .BRVBarHot                    .BRSeekBlock

     oDB:cargo[ 8 ]                  oDB:cargo[ 14 ][ 4 ]
         Horizontal Scroll Bar          Search prefix for
         .BRHScrollBar                         scoped browses
                                       .BRSeekPrefix
     oDB:cargo[ 8 ][ 1 ]
         Horizontal Scroll Bar       oDB:cargo[ 14 ][ 5 ]
                Top                     Search mask for
         .BRHBarop                         transformed displays
                                        .BRSeekMask
     oDB:cargo[ 8 ][ 2 ]
         Horizontal Scroll Bar       oDB:cargo[ 14 ][ 6 ]
                Left                   Seek String for Searches
         .BRHBarLeft                   .BRSeeker

     oDB:cargo[ 8 ][ 3 ]
         Horizontal Scroll Bar
                Bottom
         .BRHBarBottom

        Browse Columns Cargo

     column:cargo[ 1 ]
             Column Editable
             .BRCEdit

     column:cargo[ 2 ]
             Column Picture String for Gets
             .BRCPic

     column:cargo[ 3 ]
             Column WHEN block for Gets
             .BRCWhen

     column:cargo[ 4 ]
             Column Valid block for Gets
             .BRCValid

     column:cargo[ 5 ]
             Column GetReader block for Gets
             .BRCReader

       Arguments:

     NONE

       Return:

     Object

       Example:

     LOCAL oBrowse := twBRGetBrowse()
     // perform any necessary operations, including RefreshAll().

See Also: twBRBrowse()

Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson