Welcome Serena Central users! CLICK HERE
The migration of the Serena Central community is currently underway. Be sure to read THIS MESSAGE to get your new login set up to access your account.
DavidP Absent Member.
Absent Member.
1731 views

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

0 Likes
3 Replies
Micro Focus Expert
Micro Focus Expert

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

0 Likes
DavidP Absent Member.
Absent Member.

RE: cursor positions

Thanks! I will try this.

David

0 Likes
aw_muench Respected Contributor.
Respected Contributor.

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.

0 Likes
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.