ui.Interface.setType()

This method is used to configure MDI and is used to specify the type of the application. The setType() method must be called before any interaction statement (e.g., before DISPLAY).

The method can pass one of thethree values:

ui.Interface.setType("container") will have an effect only if there are no open windows.

If there are any open windows, ui.Interface.setType("container") will be ignored.

Child application without any type run from the MDI container will behave as an application called by ui.Interface.setType("child").

Example program

Parent application

MAIN

  CALL ui.Interface.setType("container")

  CALL ui.Interface.setName("main1")

  CALL ui.Interface.setText("This is the parent container")

  CALL ui.Application.GetCurrent().setMenuType("Tree")

  CALL ui.Application.GetCurrent().SetClassNames("tabbed_container")

  MENU

    COMMAND "RUN_normal"

      RUN "17428_child_type_normal_2" WITHOUT WAITING

    COMMAND "RUN_child"

      RUN "17428_child_type_normal_3" WITHOUT WAITING

    COMMAND "Exit"

      IF ui.Interface.getChildCount()>0 THEN

        ERROR "You must first exit the child programs."

      ELSE

        EXIT MENU

      END IF

  END MENU

END MAIN

Child application (= ui.Interface.setType("normal"))

MAIN

  CALL ui.Interface.setName("prog1")

  CALL ui.Interface.setText("NORMAL child")

  CALL ui.Interface.setType("normal")

  CALL ui.Interface.setContainer("main1")

  OPEN WINDOW w WITH 20 ROWS, 40 COLUMNS ATTRIBUTE(BORDER)

CALL fgl_getkey()

END MAIN

Child application (= ui.Interface.setType("child"))

MAIN

  CALL ui.Interface.setName("prog1")

  CALL ui.Interface.setText("MDI child")

  CALL ui.Interface.setType("child")

  CALL ui.Interface.setContainer("main1")

  OPEN WINDOW w WITH 20 ROWS, 40 COLUMNS ATTRIBUTE(BORDER)

CALL fgl_getkey()

END MAIN

 

 

Contact Us

Privacy Policy

Copyright © 2024 Querix, (UK) Ltd.