MDI mode

There are two basic ways to run and display applications:

The container program is called parent program. It groups several child program in one.

 

There are three ways to create a start menu for your MDI applications:

 

Regardless of what menu type you use, the MDI mode is switched on by these ui methods:

So, to run your applications in the MDI container, you must add these lines to the 4gl code of your main program immediately after the DEFINE block:

CALL ui.Interface.setType("container")

CALL ui.Interface.setName("window")

The menu type is specified by the method, setMenuType():

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

Lycia supports the menu virtualization for tree menus. This means that only visible menu items are rendered immediately after the application is launched. All other (initially not visible) menu items are rendered at the moment when their parent menu group is expanded. This is extremely useful for very large menus.

To make menu virtualization work, you must specify the menu type – tree – before loading this menu:

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

CALL ui.Interface.loadStartMenu(menuVar)

 

MDI applications are controlled by these environment variables:

QX_MDI

QX_MENU_WINDOW

QX_MENU_WINDOW_NEW_CHILD

 

With Material Design, all the menus get a button, Show / Hide all items, that allows collapsing and expanding all the menu groups at once.

 

With Material Design, you can add a sidebar with the shortcuts of the top-level menu groups for the menus created dynamically (by fgl functions or ui methods).

For this, you have to add the class name, md-sidebar, after setting the menu type:

CALL ui.Application.GetCurrent().SetClassNames(["md-sidebar"])

Menu without a sidebar:

Menu with a sidebar:

The shortcut displays the image set for the menu group (if any) or two first letters of its title (if the image is absent):

 

In the MDI mode, master style sheets of child applications are not loaded at all.

This restriction is introduced to Lycia because of the nature of CSS. Css styles are applied to all the applications running on the web page. This means that if all the style sheets (parent's and child's ones) are loaded, they will merge and have an unpredictable effect on the appearance of all the applications.

 

 

Contact Us

Privacy Policy

Copyright © 2024 Querix, (UK) Ltd.