Menu
Menu models the kind of
contextual menu that appears when you right-click on an application
icon in a desktop environment. A Menu contains MenuItem widgets, which are bona fide menu
items that may be selected, or PopupMenuItem widgets, which can provide
another layer of menu items (similar to the Windows Start menu). The
child of a PopupMenuItem is just
another Menu. Although it would not
be wise from a usability standpoint, you could theoretically embed an
arbitrary number of PopupMenuItem
and MenuItem dijits.
To start out, let's take a look at a simple Menu that contains only MenuItem children, as shown in Example 15-4.
Tip
By issuing a dojo.require("dijit.Menu") you also get
MenuItem and PopupMenuItem.
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access