Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- FreshWin (c) Fresh Technologies - <b>ntxrec() miscellaneous function</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
  NTXREC()                                            Miscellaneous Function
 Purpose..: Find the real record number from an NTX position
-------------------------------------------------------------------------------
 Syntax...: NtxPos( <nNtxOrd>, <nNtxPos> ) --> nRealRecNo

 Arguments: <nNtxOrd> = The current index order as returned from
                        INDEXORD().

            <nNtxPos> = The relative record number for which
                        to find the "real" record number.

 Returns..: nRealRecNo - the "real" record number's position in the DBF.

 Remark...: This function is useful for using elevator|scroll bars in
            an indexed TBrowse display. We need to find the actual
            record number after dragging the thumb in a scroll bar.
            sbWhere() tells us the relative position to which the thumb
            has been dragged. Then we can use NtxRec() to position
            the DBF record pointer.

 Source...: NTXREC.C
            Copyright: RCM Software Pty. Ltd.
            Author: Graham D. McKechnie
            Modified: Robert A. DiFalco
-------------------------------------------------------------------------------
 Example...: The example adjusts the DBF record pointer after the
            dragging the thumb in a scroll bar display.

              *-- Find position after thumb dragging.
              nPos := sbWhere( aVSB )

              *-- Go to that record
              dbGoTo( NtxRec( indexord(), nPos ) )

See Also: NtxPos()

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