-
Book Overview & Buying
-
Table Of Contents
YUI 2.8: Learning the Library
By :
This component, much like the Container that we looked at in the earlier chapter, is made up of a small family of different types of menu. There is a range of different classes that work together to bring the functionality of the different types of menu to you.
The three main classes behind the Menu family are:
YAHOO.widget.Menu
YAHOO.widget.ContextMenu
YAHOO.widget.MenuBar
Menu is a subclass of Overlay, part of the Container family, and the other two are subclasses of Menu. Just as each TabView is made of several Tabs, each kind of Menu has a different class for its items:
YAHOO.widget.MenuItem
YAHOO.widget.ContextMenuItem
YAHOO.widget.MenuBarItem
ContextMenuItem is simply an alias for MenuItem created just for the sake of symmetry. All types of menu items can have a Menu as a submenu; neither ContextMenu nor MenuBar can be nested in a menu item, they are only good at the outermost level.
All the menus are coordinated by YAHOO.widget.MenuManager, which...
Change the font size
Change margin width
Change background colour