Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Field name cursor in on? 1

Status
Not open for further replies.

fbizzell

Programmer
Jul 3, 2000
217
I am looking for a function that will tell me what field the cursor is on in a tbrowse. Is there such a thing?
 
I tried the Field() function but it expects to see a number in the (). If I put a 1 in there it will give me the name of the first field. I don't know how to tell the program which field number the cursor is sitting on.
 
I haven't touched Clipper for 10+ years, and never got to versions past Summer'87 (and tBrowse appeared first in 5.0 or so I believe), so you should check my answer using your Help file and other sources.
But quick googling on "tbrowse clipper column" found me this manual:


more presizely, this part:

tBrowse seem to have Instance Variable colPos, which "contains a numeric value indicating the data column where the browse cursor is currently located". It looks like what you are looking for.

In any case, you could have searched your Help or the Web yourself, too.
 
The colPos instance variable certainly tells me the column the cursor is on. A great help to what I am currently attempting to do. Now that I have the column number the cursor is on I can apply an appropriate filter to that column.

Thanks.
 
If you are using a custom function to respond to input, you have the proper number. If your functions's PARAMETERS line is:
PARAMETERS STAT,FLD
you could use:
FIELD(FLD)

Regards,

Mike
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top