This documentation is archived and is not being maintained.

MenuItem.MdiList Property

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.

[Visual Basic]
Public Property MdiList As Boolean
[C#]
public bool MdiList {get; set;}
[C++]
public: __property bool get_MdiList();
public: __property void set_MdiList(bool);
[JScript]
public function get MdiList() : Boolean;
public function set MdiList(Boolean);

Property Value

true to display a list of the MDI child windows in this menu item; otherwise, false. The default is false.

Remarks

When a menu item is selected to display an MDI child window list, the list is displayed as a submenu of the menu item. Only forms that are defined as MDI child forms are displayed in the window list. Only nine child windows can be displayed at a time. 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.

Example

[Visual Basic, C#, C++] The following example creates a MenuItem that is used to display the list of currently open MDI child forms in an MDI form.

[Visual Basic] 
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


[C#] 
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;
}


[C++] 
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;
 }

[JScript] No example is available for JScript. To view a Visual Basic, C#, or C++ example, click the Language Filter button Language Filter in the upper-left corner of the page.

Requirements

Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family

See Also

MenuItem Class | MenuItem Members | System.Windows.Forms Namespace

Show: