Highlighted
Absent Member.
Absent Member.
467 views

[archive] Radio sets and EVENT-ACTION-TERMINATE

[Migrated content. Thread originally posted on 21 August 2007]

I'm attempting to cancel the event action of clicking on a radio button and revert to the previous radio button using acubench. here is a sample of code that illustrates what I am attempting to do but it still just flows through and continues with the selection of the next radio button... The check for changes displays a save message box with Yes (save changes) No (abort changes) Cancel (stop the change of the radioset and leave as is).

This should be really simple to do, but it's not... any ideas?

       
MainWin-Rb-5-Ev-Cmd-Goto.
      PERFORM C100-CHECK-FOR-CHANGES THRU C100-EXIT.
      IF STATUS-CODE = 3
          SET EVENT-ACTION TO EVENT-ACTION-TERMINATE
      END-IF.
0 Likes
3 Replies
Highlighted
Absent Member.
Absent Member.

RE: [archive] Radio sets and EVENT-ACTION-TERMINATE

The only way I could get the first radio button to be "on" again - after the event cancel was to destroy and re display the screen:mad:
0 Likes
Highlighted
Absent Member.
Absent Member.

RE: [archive] Radio sets and EVENT-ACTION-TERMINATE

I just had a similar issue, and here is what I found that works:


MOVE # TO CONTROL-ID
MOVE 4 TO ACCEPT-CONTROL


Where # is the control ID for the radio button that you want to be selected. You may have to then display your screeen to see the change.

Hope that helps,

Paul
0 Likes
Highlighted
Absent Member.
Absent Member.

RE: [archive] Radio sets and EVENT-ACTION-TERMINATE

The only way I could get the first radio button to be "on" again - after the event cancel was to destroy and re display the screen:mad:


Thanks for giving it a try for me. As it appears I have noticed that you can only set a radioset's default value BEFORE you display the screen. I'm guessing this is the reason for it... To bad there isn't a more graceful way to implement this, maybe it's just not proper technique to do it this way. I wonder if there a better way to handling a situation like I want to implement maybe?
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.