Highlighted
Absent Member.
Absent Member.
429 views

[archive] display message box in after procedure

[Migrated content. Thread originally posted on 02 July 2008]

Good days,

We have an issue when a display message box is made in an after procedure in a entry field. When you exit by tab key or a mouse click we show a dialog with a message, but then, the focus didn't go to the next field or the clicked field, it returns to the field where the message was shown, not allowing the user to exit that field of course. We had try to force the focus to change, but the field still get the focus.

03 Ef-Message, Entry-Field,
COL 12,10, LINE 41,40, LINES 2,00 CELLS,
SIZE 14,80 CELLS,
BOXED, UPPER, COLOR IS colores-ent-dat-alf, ID IS 9,
RIGHT, MAX-TEXT 20, NOTIFY-CHANGE,
LAYOUT-DATA = RLM-MOVE-Y-RESIZE-X,
AFTER PROCEDURE Ef-Barra-Aft-Procedure,
BEFORE PROCEDURE Ef-Barra-Bef-Procedure,
EVENT PROCEDURE Ef-Barra-Event-Proc.

Ef-Mensaje-Aft-Procedure.
display message box "Hi"

inquire Ef-Next, id Control-id
move 4 to accept-control
.

? Any ideas ?

Thank you
0 Likes
4 Replies
Highlighted
Absent Member.
Absent Member.

RE: [archive] display message box in after procedure

Ciacsl:



Try the next...

modify Ef-Message cursor = 1


----- Delete This ----------
inquire Ef-Next, id Control-id
move 4 to accept-control


Greetings
0 Likes
Highlighted
Absent Member.
Absent Member.

RE: [archive] display message box in after procedure

I think you should contact Customer Care as there has been a bug with focus being returned correctly after a message box exits. There may be an ecn that could be provided by a patch.
0 Likes
Highlighted
Absent Member.
Absent Member.

RE: [archive] display message box in after procedure

I have a similar issue where I try to change the focus to an entry field after pressing the ok button. When you press the "Ok" button, it validates the different fields to make sure that the user has put data in them. If the field is blank, I then display a message box and then set the accept-control to 4 and set the id of the field I want the cursor to go to. If I comment out the "Display Message Box" call, then it works and the cursor goes to the desired field. Is this caused by the ECN or related to it? I'm running 7.2.1 version.

Code:
IF Screen13-Ef-3-Value = SPACES
DISPLAY MESSAGE BOX
"POS Descriptor Field Required!"
TITLE "ERROR"
ICON MB-ERROR-ICON
END-DISPLAY
MOVE 4 TO ACCEPT-CONTROL
MOVE 3 TO CONTROL-ID
END-IF.
0 Likes
Highlighted
Absent Member.
Absent Member.

RE: [archive] display message box in after procedure

The fix for returning from modal API dialog (display message box) would override coded focus is in ecn3813 which is included in version 8.1.0. It is doubtful that you have this ecn unless you requested theis ecn patched into your version.
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.