View previous topic :: View next topic |
Author |
Message |
jim haire Beginner
Joined: 30 Dec 2002 Posts: 140 Topics: 40
|
Posted: Wed May 26, 2010 8:18 am Post subject: How to know the line number a cursor is on in browse session |
|
|
I would like to be able to determine the record number my cursor is on within a browse session.
Not the line number on the screen. The record number within a file. Is there any good algorithm to do this?
In edit or view mode, this is easy. With files that are too large and are in browse mode, I haven't found a consistent way to determine this. |
|
Back to top |
|
![](templates/subSilver/images/spacer.gif) |
kolusu Site Admin
![Site Admin Site Admin](images/ranks/adminpic.jpg)
Joined: 26 Nov 2002 Posts: 12370 Topics: 75 Location: San Jose
|
|
Back to top |
|
![](templates/subSilver/images/spacer.gif) |
semigeezer Supermod
Joined: 03 Jan 2003 Posts: 1014 Topics: 13 Location: Atlantis
|
Posted: Wed May 26, 2010 10:57 pm Post subject: |
|
|
trying to get the line # will be tricky. You probably have to go against variables ZSCREENI and ZSCREENC but even that has idiosyncrasies that are hard to predict (things like split screen, PFSHOW ON/OFF, action bars, how the exec is started, etc).
Best bet is probably to create your own browse panel and vput line# at the top and the cursor offset to the profile pool. Then calculate the line # based on screen width (another effort plagued with odd idiosyncrasies, unfortunately) _________________ New members are encouraged to read the How To Ask Questions The Smart Way FAQ at http://www.catb.org/~esr/faqs/smart-questions.html. |
|
Back to top |
|
![](templates/subSilver/images/spacer.gif) |
|
|