Events

CMD-CLICKED

If a status bar does not have the SELF-ACT style applied, it will generate the CMD-CLICKED when a mouse is clicked on it. To capture the event, the status bar instance must have an EVENT PROCEDURE assigned.

The event will return two items:

  • EVENT-DATA-1: The current style of the panel clicked
  • EVENT-DATA-2: The index of the panel clicked

Example:

01 ScreenDemo.
           03 MANUAL-PANEL   STATUS-BAR
              PANEL-WIDTHS (10, 10, 10, -1)
              PANEL-STYLE  (1, 2, 1, 2)
              PANEL-TEXT   ("Pan 1", "Pan 2", "Pan 3", "Pan 4")
              EVENT PROCEDURE PanelEvent.
        ...
        PanelEvent.
           IF EVENT-DATA-1 > 1
              MOVE 0 TO EVENT-DATA-1
           ELSE
              ADD  1 TO EVENT-DATA-1
              END-IF
           MODIFY MANUAL-PANEL
                  PANEL-INDEX EVENT-DATA-2
                  PANEL-STYLE EVENT-DATA-1
           EXIT PARAGRAPH
           .

SELF-ACT turns off the new CMD-CLICKED event. Clicking the status bar will not change the focus of the screen. Clicking the status bar will not terminate an accept unless specifically coded to do so.

The raised and lowered panels do not work with XP Visual styles (WIN32_NATIVECTLS runtime configuration variable). Events will occur, but you will have to detect the events and change text to visualize the clicks. The SELF-ACT style will not cause any visual change; it will, however, change the panel style.