Skip to main content

[archive] display message box in after procedure

  • July 2, 2008
  • 5 replies
  • 0 views

[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

5 replies

[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
Ciacsl:



Try the next...

modify Ef-Message cursor = 1


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


Greetings

[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
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.

[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
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.

[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
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.

[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
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.