Color scheme: Light
You are here: start » en » Documentation » Microsoft Access development tools » WKL Forms Object Library » WKL Forms Object Library how-to guides » How to: Let the navigation bar lie over the page

How to: Let the navigation bar lie over the page

Keep the page as wide as possible: the bar takes up only the space of its icon column and opens over the page when the user expands it.

Requires WKL Forms Object Library 1.24 or later.

Solution overview

Set Pinned to False (with the Pinned switch on the designer's Behavior page, or in the property sheet). When the bar is unpinned, its space is always the icon column; expanding it (with the toggle button, the shortcut, or Mode = wnmExpanded) opens the expanded bar in its own window over the page. It closes when the user chooses an entry, presses Esc, or clicks outside it.

Implementation

Without code, turn off Pinned in the designer. To let each user decide:

Private Sub chkPinned_AfterUpdate()
    Me!navMain.Object.Pinned = Me!chkPinned.Value
End Sub

Remarks

  • A form never opens with the bar lying over the page: an unpinned bar that's designed expanded opens as the icon column.
  • The page keeps its size while the bar lies over it, so a page with its own layout isn't rearranged.
  • The overlay also covers subforms (Access draws subforms over ActiveX controls, so the bar opens its own window), and it follows when the Access window moves.
  • Pinning is part of the user state that AutoSaveLayout remembers.
en/wiki/msaccess/comctl/how-to/let-the-navigation-bar-lie-over-the-page.txt · Last modified: by Wolfgang van der Stille