|
w.MenuItems.Add("Tile &Horizontal", new EventHandler(this.WindowTileH_Clicked)); miWindow.MenuItems.Add("Tile &Vertical", new EventHandler(this.WindowTileV_Clicked)); miWindow.MDIList = true ; //Adds the MDI Window List to the bottom of the menu
AddDocument(); //Add an initial doc }
//Add a document private void AddDocument() { windowCount++ ; Document doc = new Document("Document " + windowCount); doc.MDIParent = this; doc.Show(); }
//File->Add Menu item handler protected void FileAdd_Clicked(object sender, System.EventArgs e) { AddDocument() ; }
//File->Exit Menu item handler protected void FileExit_Clicked(object sender, System.EventArgs e) { this.Close(); }
//One of the MDI Child windows has been activated protected void MDIChildActivated(object sender, System.EventArgs e) { if (null == this.ActiveMDIChild) { statusBar1.Text = ""; } else { statusBar1.Text = this.ActiveMDIChild.Text; } }
//Window->Cascade Menu item handler protected void WindowCascade_Clicked(object sender, System.EventArgs e) { this.LayoutMDI(MDILayout.Cascade); }
//Window->Tile Horizontally Menu item handler protected void WindowTileH_Clicked(object sender, System.EventArgs e) { this.LayoutMDI(MDILayout.TileHorizontal); }
//Window->Tile Vertically Menu item handler protected void WindowTileV_
上一页 [1] [2] [3] 下一页
|