Skip to content
Menu
Menu

Knowledge Base

KB050158 | NESTING OBJECTS IN ELVIS

KB050158 | NESTING OBJECTS IN ELVIS

Product: Elvis
Version: from 2.7
Booth: 2009-02-17

Summary

On the basis of an example project (Layer_Container.zip), a pull-down menu is to be displayed, which is implemented via layers with state buttons.

Details

Sometimes you want to combine several objects, e.g. control elements, into a kind of “collection container” or “container” in order to dynamically change them all by a single, central operation on the container object. So something similar to a “panel” (known from other systems) should be simulated, which can be switched to “visible” or “invisible” for example and thus – in one fell swoop – also the elements contained therein (buttons, sliders, text outputs, etc.).

Although there is no panel in Elvis in the narrower sense, there are one or more layers on each Elvis operating page, which can also serve as containers for control elements.

On the basis of an example project (Layer_Container.zip), a pull-down menu is to be displayed, which is implemented via layers with state buttons:

It consists of only one page, which, in addition to the “Controls” and “Background” layers, also contains the “Basement”, “Ground Floor” and “Stock1” layers. After opening, only the buttons “Basement”, “Ground floor” and “1st floor” are displayed, which are contained in the “Controls” layer. After clicking on the “Basement” button, the blue buttons “Hallway” and “Guest Room” of the associated layer “Basement” also appear, because this switches it to “visible”.

For example, if you now click on “Ground floor”, the layer “Basement” (with the two blue buttons) becomes invisible again and instead the layer “Ground floor” is displayed with three red buttons. Similarly, when you click on “1st floor”, only the “Bedroom” button of the “Floor1” layer is displayed.

Finally, the additional “Submenu OFF” button can be used to hide all three layers again, so that the output state is displayed when the page is opened.

The logic for showing and hiding the three layers is stored in the global subroutine “Layer_Init” of the page event processing (under “Form/(global)”). For certain events, such as opening the page (“Form_Load”) or button clicks, this subroutine is then only called with different arguments for layer visibility.

Download the sample project

Support Area

KB050158 | NESTING OBJECTS IN ELVIS

Knowledge Base

Here you will find answers, solutions to problems and examples of our products.
KB050158 | NESTING OBJECTS IN ELVIS

Case Studies

Successful in use: practical examples of our products and individual developments.
KB050158 | NESTING OBJECTS IN ELVIS

Support

Describe your concern using our support form.
KB050158 | NESTING OBJECTS IN ELVIS

License registration

Register your Elvis license!

IT GmbH · An der Kaufleite 12 · D-90562 Kalchreuth

© Copyright 2024. IT GmbH | Webdesign by Appear Online