IMDTouchKnowledge BaseShop main store

How-to

How to Build Two-Level Tab Navigation With Child Screens in WinCC

HMI and touchscreens Published 6 min read

Short answer

Build two-level navigation in WinCC with one persistent main picture, a picture window for content, and visibility-controlled child menus. Each main-tab press must set three things at once: the tab's own selected state, the matching child menu, and the initial child picture. A graphics group only bundles objects in the editor and creates no runtime navigation.

On this page
  1. Why the group alone will not navigate
  2. The shell: one persistent picture, one picture window
  3. What each press must set
  4. Building the two-level menu
  5. Worked example: two tabs, three child buttons per section
  6. Runtime checks
  7. Questions asked

In WinCC V8, a graphics group is editor convenience and nothing at runtime: it lets you move and size tab-shaped objects together, and it records nothing about which section is active or which picture a press opens. Two-level navigation needs one persistent main picture holding the tab buttons and the child-menu buttons, plus a picture window that displays the selected child picture inside that shell. Every main-tab press must set three things together — the tab's own selected state, the visibility of the matching child menu, and the initial child picture in the content window. Set only one or two and the interface misleads the operator even though every picture opens. The steps below build this for two tabs with three children each and finish with the Runtime checks that prove it.

Why the group alone will not navigate #

A group answers a layout question, not a navigation question. Objects can look like tabs in the editor while having no runtime behavior, so read the symptom before touching the layout — each one points at a different missing setting:

  • Clicking A or B changes nothing: the button carries no event action for the press.
  • Both child menus stay visible: nothing drives the menu sets' visibility from the section selection.
  • The main tabs disappear after a child opens: the child picture replaced the whole main picture instead of appearing inside the picture window.

The third symptom is the one that forces an architecture change, so settle it first.

The shell: one persistent picture, one picture window #

A picture window is an object that displays another picture inside the area you assign it, which is exactly what lets the surrounding navigation stay visible while the content changes. Keep the main tabs in the persistent main picture and change only what the window displays. That separation also spares every child picture from carrying its own copy of the main controls, and it is the same discipline behind WinCC dual-monitor navigation inside picture windows when one shell spans two displays.

Element Job
Tab buttons A and B Select the section and hold its highlight
Child-menu strip Present the active section's child buttons
Picture window Display the selected child picture
Internal selection tags Carry which tab and which child are active

What each press must set #

Selection state is information, and it belongs in tags so that both the highlights and the menu visibility can read it. Use one internal BOOL tag per tab and one per distinct child picture; the names below are illustrative, the mechanism is not.

  • TabA_Selected, TabB_Selected — BOOL; initial values 1 and 0, so section A starts.
  • Child_A1_Selected, Child_A2_Selected, Child_A3_Selected, Child_B1_Selected — BOOL; Child_A1_Selected starts at 1, the rest at 0.

A tab press then carries three settings: its own tag to 1 and the other tab's tag to 0, so the highlight follows; the menu strip switches itself because each set's visibility is attached to its tab tag; and the initial child picture loads into the window's Picture Name property. The V8 step-by-step material uses Direct Connect for exactly this kind of navigate action on buttons, so add the settings to the button's press event with whichever entry types your project uses. A child press carries two: its child tag, and its picture into the same window — never as a replacement of the main picture.

Building the two-level menu #

  1. Fix the screen map first. The menu built here: tab A opens A.1, A.2, A.3; tab B opens B.1, A.2, A.3. Tab B reusing two A screens is either a deliberate share or a labeling slip — decide now, because every button needs exactly one destination. Example picture names: A_1, A_2, A_3, B_1.
  2. Create the child pictures and size them to the content window's area. Check the window's display settings for clipping or unintended scaling before styling anything.
  3. Create the main picture: tab buttons on top, a reserved strip for the child menus, the picture window below. Place the picture window object from the toolbox and double-click it — the Object properties dialog opens, and that is where you set the picture it displays and its remaining attributes.
  4. Create the internal tags TabA_Selected, TabB_Selected, Child_A1_Selected, Child_A2_Selected, Child_A3_Selected, Child_B1_Selected with the initial values listed above.
  5. Lay both three-button sets in the strip and attach each set's visibility to its tab tag, TabA_Selected for A's set and TabB_Selected for B's. Give every button a highlight object — a filled rectangle behind it works — with visibility attached to the matching tag.
  6. Configure each tab button's press event with its three settings: TabA_Selected = 1, TabB_Selected = 0, A_1 into Picture Name for the A button, and the mirror of those for the B button.
  7. Configure each child button's two settings, addressing the content window as the destination — for example Child_A2_Selected = 1 with A_2 into Picture Name.
  8. Save, then test in a freshly started Runtime.

Worked example: two tabs, three child buttons per section #

Inputs and where they come from: 2 main tabs and 3 child buttons per section are the menu being built; the reuse of A.2 and A.3 under tab B is in that same list; the settings-per-event counts come from the architecture rule above.

Rule in words: multiply each kind of control by the settings its event must carry, add the products, and count distinct pictures after merging the shared ones.

  • Distinct child pictures: 3 under tab A + 1 new under tab B = 4 (A_1, A_2, A_3, B_1)
  • Child button instances: 3 + 3 = 6
  • Internal BOOL tags: 2 tab tags + 4 child tags = 6
  • Tab-event settings: 2 buttons × 3 settings = 6
  • Child-event settings: 6 buttons × 2 settings = 12
  • Total event settings: 6 + 12 = 18

Result: one shell picture, four child pictures, six tags, eighteen configured settings — and no per-child copy of the main tabs anywhere.

Decision: at three children per section, build both menus into the main picture and switch them with visibility; that is the right arrangement up to the point where a section's menu no longer fits the reserved strip, and this menu sits far inside it. Treat B's A.2 and A.3 entries as shared pictures — one picture, one child tag, referenced from both menus — and label each button by what it actually opens. If the repeat was a slip, fix the map in step 1, not the configuration.

Runtime checks #

Verify in Runtime; the editor's appearance proves nothing about event actions or visibility dynamics.

  • Start Runtime fresh: tab A highlighted, only its three child buttons visible, A_1 displayed.
  • Walk tab A's children: the shell stays, each press loads its picture, the highlight follows the displayed picture.
  • Switch to tab B while an A child is open: B's menu replaces A's, B_1 loads, no leftover A highlight remains.
  • Open A_2 from both menus: the same picture loads, and the section highlight stays with the section you are in.
  • Restart Runtime: the initial tag values must give the same coherent first screen.

Changes reach the running picture only when the edited project is loaded — which is why an HMI edit needs a new runtime download — so retest after that load, not only in a session that was already running.

Questions asked

Tab B's list contains A.2 and A.3. Is that allowed?

Yes. Build one picture per content and reference it from both menus, which is why the worked example counts 4 distinct child pictures for 6 menu buttons. Give the shared child a single selected-state tag so its highlight is correct whichever menu is visible, and label each button by the picture it actually opens. If the repeat was a labeling slip, correct the map before configuring anything.

Can a tab reopen the child screen the operator last used, instead of the first one?

Yes. Keep an internal text tag holding the current child picture name, write it on every child change, and have the tab's event load that tag's value into the content window instead of a fixed picture. Define what loads on first start, when the tag still holds nothing valid, and prove it by starting Runtime fresh rather than switching pictures mid-session.

Why do my new tab buttons do nothing in Runtime?

Two usual causes. The running system executes the stored project, so changes made in the engineering view appear only after the edited pictures are loaded into Runtime; restart and retest before diagnosing. If the buttons are still dead, open the press event and confirm it actually carries its settings. A group of well-drawn buttons with no event action produces exactly this symptom.

Can I add a third navigation level under a child screen?

Yes. A picture displayed in a picture window is an ordinary picture, so it can contain its own picture window and its own child menu. Keep each level's navigation controls in that level's own shell so the operator always sees where they are, and apply the same three-setting event rule to the new level's section buttons.

Keep reading

  • How-to

    Keep WinCC dual-monitor navigation inside picture windows

    Keep the 2560 x 1024 parent picture loaded as the permanent start picture and retarget each navigation button's direct connection so its open-picture action lands on the picture window object instead of the full screen. Only the selected 1280 x 1024 window changes; the other monitor and the parent layout survive every press.

    HMI and touchscreens

  • How-to

    Binding PLC tags from different DBs to a WinCC HMI UDT

    No configuration makes an HMI UDT span multiple data blocks: a structured HMI tag resolves to one addressable PLC instance. With the PLC program frozen, keep every existing address, create one external HMI tag per variable, and assign them to the faceplate interface properties at each instance; the screen-window tag prefix cannot supply per-equipment data and only reaches shared values with the documented marker.

    HMI and touchscreens

  • Explainer

    Does One Shared Script Speed Up WinCC Screen Animations

    No for screen changes: opening a picture loads graphics, dynamic bindings and initial tag values, and consolidating animation scripts into one does not reduce that. Yes for steady-state runtime, but only when the grouped animations share one frame rate and phase, the trigger is scoped to the picture, and the shared counter has exactly one writer. Expect the visible running cycle to be three times the trigger interval.

    HMI and touchscreens