|GUI ScreenIO for Windows|
A pushbutton is not like the data-related controls; it's treated exactly like a menu item.
When the user presses a pushbutton (or its accelerator key), GUI ScreenIO will return to your program, and the reason for the return will be found in the event ID field.
You test this by evaluating the 88 level items beneath the event ID field, same as for any other event.
The name of the 88 level item for your pushbutton and menu events is provided by you when you define them. The editor just prefaces the panel name so that the events are unique if you have more than one panel in your program with the same event name.
Here's a portion of the panel copybook showing how the event ID field is defined, with the value for a pushbuttons named ENGLISH, FRENCH, and SPANISH.
If you checked the box "May be disabled at runtime" when you defined your pushbutton, these additional fields will appear in your copybook. The comments explain how to use these fields..
Here's the coding style we'd use to display a panel and test why it came back.
|© 2000-2019 Norcom, all rights reserved|