Re: Forms 3.0 Answer - Determining Cursor Y position
Date: Fri, 8 Oct 93 01:53:03 GMT
Message-ID: <1993Oct8.015303.3193_at_sequent.com>
Y_POS gives the static definition of the top occurance of the field.
To determine the current cursor coordinate, you need to
1 get the Y_POS,
2 then add the product of
- the number of lines that each record takes up in the block (which you must hard code I believe) x B. the number of the record you are on, (:SYSTEM.CURSOR_RECORD) minus the number of the record that is currently the top record displayed in the block, block_characteristic(top_record)
In abbreviated PL/SQL, it looks something like:
hardcoded nbr vvvvvvvvv
CurY := field_char(y_pos) + lines/rec * (:sys.cursor_rec - block_char(top_rec))
or, in a simple 1 line per record block it simplifies to
CurY := field_char(y_pos) + :sys.cursor_rec - block_char(top_rec)
busch1_at_llnl.gov (Jeff Busch) writes:
>I have two possibly related questions. I have a multirecord block and
>1) I'd like to give each record retrieved in a query a sequential number.
>When I select rownum into a display-only field in a post-query trigger, each
>row is numbered 1.
>2) I'd like to determine the exact position of the cursor so I can pass
>variable parameters to EDIT_FIELD based upon the cursor position. I've
>tried to use FIELD_CHARACTERISTIC, but the Y_POS doesn't change if the
>cursor is on a different row.
>Any help would be appreciated.
>---
>Jeff Busch Internet busch1_at_llnl.gov
>Voice (510) 423-9134 Fax (408) 263-1360
Received on Fri Oct 08 1993 - 02:53:03 CET