MenuItem.MdiList 属性
定义
获取或设置一个值,通过该值指示是否使用在关联窗体内显示的多文档界面 (MDI) 子窗口列表来填充菜单项。Gets or sets a value indicating whether the menu item will be populated with a list of the Multiple Document Interface (MDI) child windows that are displayed within the associated form.
public:
property bool MdiList { bool get(); void set(bool value); };
public bool MdiList { get; set; }
member this.MdiList : bool with get, set
Public Property MdiList As Boolean
属性值
如果要在此菜单项中显示 MDI 子窗口列表,则为 true;否则为 false。true if a list of the MDI child windows is displayed in this menu item; otherwise, false. 默认值为 false。The default is false.
示例
下面的代码示例创建一个 MenuItem ,用于显示 mdi 窗体中当前打开的 mdi 子窗体的列表。The following code example creates a MenuItem that is used to display the list of currently open MDI child forms in an MDI form.
public:
void SetMDIList()
{
// Create the MenuItem to be used to display an MDI list.
MenuItem^ menuItem1 = gcnew MenuItem;
// Set this menu item to be used as an MDI list.
menuItem1->MdiList = true;
}
public void SetMDIList()
{
// Create the MenuItem to be used to display an MDI list.
MenuItem menuItem1 = new MenuItem();
// Set this menu item to be used as an MDI list.
menuItem1.MdiList = true;
}
Public Sub SetMDIList()
' Create the MenuItem to be used to display an MDI list.
Dim menuItem1 As New MenuItem()
' Set this menu item to be used as an MDI list.
menuItem1.MdiList = True
End Sub
注解
选择菜单项以显示 MDI 子窗口列表时,该列表显示为菜单项的子菜单。When a menu item is selected to display an MDI child window list, the list is displayed as a submenu of the menu item. 只有定义为 MDI 子窗体的窗体才会显示在窗口列表中。Only forms that are defined as MDI child forms are displayed in the window list. 一次只能显示9个子窗口。Only nine child windows can be displayed at a time. 如果显示9个以上的子窗口,则为 "更多窗口 ..."菜单项显示在窗口列表的末尾。If there are more than nine child windows displayed, a "More Windows..." menu item is displayed at the end of the window list. 单击此菜单项将显示一个对话框,其中包含当前处于活动状态的子窗口的完整列表。Clicking this menu item displays a dialog box with a complete list of the child windows that are currently active.