You are here: LANSA for i User Guide > Appendix C. Technical Notes > GUI WIMP Constructs > Push Buttons

Push Buttons

A push button is an area on the screen labeled with text, which represents an action that will be initiated when a user selects it.

        BEGIN_LOOP

          REQUEST    FIELDS(#SCREEN)

          IF         COND('#IO$KEY *EQ ''BC'')

            MESSAGE    MSGTXT('Button 12 was Pressed')

          ENDIF

        END_LOOP

 

and also through the WAS() option of the IF_KEY command:

        BEGIN_LOOP

          REQUEST    FIELDS(#SCREEN)

          IF_KEY     WAS(*BUTTON1)

            MESSAGE    MSGTXT('Button 1 was Pressed')

          ENDIF

        END_LOOP