GUI ScreenIO for Windows

 ScreenIO.com


Conditional Statements

Conditional statements determine whether the associated imperative statement(s) will be executed.

General format

   ??IF:condition value !!imperative-statement

where value is optional data.

Alternate format

   ??IF:condition value !!THEN:
    !!END-IF:

This format allows you to include more than one statement within a condition.  The scope of the condition is terminated when it encounters the !!END-IF (or ??END-IF) statement.

You may include both code-generator statements and COBOL code within the scope of this format, as shown in this example:

    ??IF:HOTFIELDS !!THEN:
                 WHEN @@PANEL@@-HOT-RETURN
                   EVALUATE TRUE
         !!INCLUDE:HANDLE-HOT-EVENT
                   END-EVALUATE
    !!END-IF:

Remarks

Conditional Description
BUTTONSWITCH Tests if the panel contains buttons which can be enabled or disabled by your program.


??IF:BUTTONSWITCH !!INCLUDE:name

CONTROLNAME control-name Tests if the panel contains a control with the COBOL name control-name

If control-name is not specified, the condition will be TRUE for all controls on the panel.


??IF:CONTROLNAME COMPANY-NAME !!INCLUDE:name

CONTROLTYPE control-type Tests if the panel contains a control of the specified type; legal values are:  COMBOBOX, LISTBOX, LISTVIEW, or TREEVIEW.


??IF:CONTROLTYPE LISTVIEW !!INCLUDE:name

HOTFIELDS Tests if the panel contains hot fields


??IF:HOTFIELDS !!INCLUDE:name

IMAGECLICK Tests if the panel contains image fields which may return an event.


??IF:IMAGECLICK !!INCLUDE:name

MENUEVENTS Tests if the panel can return menu events; these can be returned by menus or by pushbuttons.


??IF:MENUEVENTS !!INCLUDE:name

MENUSWITCHES Tests if the panel has a menu with items that can be enabled, disabled, checked, or unchecked by your program. 


??IF:MENUSWITCHES !!INCLUDE:name

PANELTYPE panel-type Tests for a specific type of panel.  Legal values for panel-type are:  MAIN, BASE, POPUP, PROPERTYSHEET, or WIZARD


??IF:PANELTYPE PROPERTYSHEET !!INCLUDE:name

SELCHG Tests if the panel can return selection-changed events.


??IF:SELCHG !!INCLUDE:name

SELECTORS Tests if the panel contains selector fields. 


??IF:SELECTORS !!INCLUDE:name


© 2000-2019 Norcom, all rights reserved 

TOC

Send feedback to Norcom