
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
cursor positions
This is related to having a function (F1) that can do 2 functions on the same screen. They are pressing
F1 instead of clicking on the button.
It is a 15 line scroll screen with search functions at the bottom of the screen.
You can click on the scroll line and press F1 to see the details of this line.
At the bottom of the screen you can leave blank or key in a value and press F1 to search by this value.
the row is still selected and I still want to show that so they know what record was last selected.
Now I want to click on the search entry field and key in a value. When I press F1 at this time it still thinks it is going to do
the details function instead of the search function.
I want to trap the position of the cursor when I click on the search entry box to know I am in that field.
Is there a way to do that on a graphical screen?
Thanks,
David

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
RE: cursor positions
You can use the inquire verb to inquire on the property of a control. Such as:
inquire Form1-Ef-1 cursor my-curr
my curr now holds the cursor position, a value of abc in the entry-field, with the cursor positioned after the c will give you a value of 4

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
RE: cursor positions
Thanks! I will try this.
David

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
RE: cursor positions
Do you need to know the position where the cursor is or do you want to know if the cursor is in the search box ?
In the latter case it would be handy to give the entry-field an ID.
Either fix
ID = 00106
or variable with a working storage field
ID = ID-SEARCHBOX
The value for this working storage field has to be given before the first display !
After your accept statement you can code
EVALUATE EXCEPTION-STATUS
WHEN F1-PRSSED
EVALUATE CONTROL-ID
WHEN ID-SEARCHBOX
PERFORM PROCSEARCH
WHEN OTHER
PERFORM PROCDETAIL
END-EVALUATE
...
END-EVALUATE.