Chapter 11: Using Menu-Based Controls--About menu-based controls

关于基于菜单的控件

Flex框架中包括三个控件能够以级联菜单的格式展示分层数据,所有的菜单控件中的每一个菜单项都有一个icon和label,并且都能派发出

mx.events.MenuEvent事件来响应用户,你可以使用如下基于菜单的控件。

 Menu控件   一个可视化的菜单,它可以有级联的子菜单项,通常你显示一个菜单是为了响应用户的行为,比如单击一个button,注意:你不能用MXML标签定义一个Menu控件,必须在Actionscript中定义、展示它或者隐藏它。

 MenuBar控件 用于存放多个菜单项的水平bar ,当你单击menubar中的item时,它的每一个item都能显示一个子菜单,menuba控件是一个有效的静态的(所谓静态指不能pop-up)菜单,它把菜单中的最顶层作为它当中的item显示出来。

 PopUpMenuButton控件 是PopUpButton控件的子类,它

About menu-based controls
Flex framework includes three controls that present hierarchical data in a cascading menu format. All menu
controls can have icons and labels for each menu item, and dispatch events of the mx.events.MenuEvent class in
response to user actions. You can use the following menu-based controls:
Menu control A visual menu that can have cascading submenus. You typically display a menu control in response
to some user action, such as clicking a button. You cannot define a Menu control by using an MXML tag; you must
define it, display it, and hide it by using ActionScript.
MenuBar control A horizontal bar of menu items. Each item in the menu bar can have a submenu that displays
when you click the MenuBar item. The MenuBar control is effectively a static (non-pop-up) menu that displays
the top level of the menu as the bar items.
PopUpMenuButton control A subclass of the PopUpButton control that displays a Menu control when you click
the secondary button. The primary button label changes when you select an item from the pop-up menu.


你可能感兴趣的:(Chapter 11: Using Menu-Based Controls--About menu-based controls)