Re: MDI child menu not merged
- From: "Steve Barnett" <noname@xxxxxxxxxxxx>
- Date: Fri, 12 Jan 2007 13:41:33 -0000
You might also get some useful information here:
http://www.windowsforms.net/FAQs/default.aspx?PageID=3&CategoryID=3&SubcategoryID=93&tabindex=3
When I was playing with MenuStrip and Toolstrip (before I gave up), I got
started here and got a working example (now long lost):
http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=50009&SiteID=1
HTH
Steve
"Steve Barnett" <noname@xxxxxxxxxxxx> wrote in message
news:e1%23s1yiNHHA.3944@xxxxxxxxxxxxxxxxxxxxxxx
"Andrus" <kobruleht2@xxxxxx> wrote in message
news:%232cEDwZNHHA.4244@xxxxxxxxxxxxxxxxxxxxxxx
Steve,
thank you for excellent documentation. Some questions:
1. This problem does not occur when I used MainMenu. I starts to occur
when I switched to MenuStrip. Why this causes the issue?
Ah, MainMenu and MenuStrip are different.
The MenuStrip requires that you explicitly merge the menus yourself. Have
a read of
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpref/html/frlrfSystemWindowsFormsMenuItemClassMergeMenuTopic.asp
for more information. I did have a test application that did this, but
"lost" it somewhere along the way when I converted my application to a tab
interface and reverted to MainMenu (for the easier merging!).
2. I have same parent class for both parent and child forms. Properties
are overridden in inherited classes. Can this cause the issue ?
Doubt it.
3. I have found that menu in child form is not removed if all items are
merged. Must I set child Menustrip Visible property to false or is there
some other solution?
You must make them invisible. They will remain on the form if left
visible. I generally make then invisible at design time.
4. I need to merge Toolstrip buttons also. Will Toolstrip button merging
work in the same way as menu merging ? Can I remove child toolstrip by
setting its visible propery to false ?
For merging toolStrips, I have the following code in the MDI parent that
merges a child toolbar on to a parent one.
private void MainForm_MdiChildActivate(object sender, EventArgs e)
{
// MDI Child form was activated - merge it's tool bar
ToolStripManager.RevertMerge(toolEdit);
if (this.ActiveMdiChild != null)
{
if (this.ActiveMdiChild is EditForm)
{
// New child form - merge it's tool menu
ToolStripManager.Merge(((EditForm)this.ActiveMdiChild).EditToolbar,
toolEdit);
}
}
}
5. If I send you the application can yuo look into it?
Probably I can create reproducible code by extracting parts of my
application but this requires a lot of work.
I think you shoul repost the question here first. My experience with C# is
very basic; I'm only learning and I'm sure there are experts here who can
help you far better than I can.
6. Why your excellent doc is not linked from your main site ?
See (5). I create snippets of documentation when I struggle with a
concept - it's hardly "publishable" quality stuff.
Andrus.
"Steve Barnett" <noname@xxxxxxxxxxxx> wrote in message
news:ujqwRzVNHHA.5000@xxxxxxxxxxxxxxxxxxxxxxx
It's hard to see what's wrong as the source does not include everything
I need to reproduce. I know that, when I first started merging menus, I
had lots of problems like this, so I put together a short note that ran
me through an example of what I needed to do. If you want it, it's
online at http://www.sabarnett.co.uk/docs/MenuMerging.pdf
I can't see anything obvious just scanning the source. Perhaps someone
else can spot the obvious.
Steve
"Andrus" <kobruleht2@xxxxxx> wrote in message
news:eufWxxONHHA.1008@xxxxxxxxxxxxxxxxxxxxxxx
Steve,
thank you. Checked that Text property is same in both forms ( &File)
but menus are not merged.
I tried this but my menus are still not merged.
Any idea why this happens ?
Andrus.
My child form is based on class.
Here are both files:
My mainform.designer.cs file:
partial class MainForm
{
private System.ComponentModel.IContainer components = null;
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Windows Form Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
System.ComponentModel.ComponentResourceManager resources = new
System.ComponentModel.ComponentResourceManager(typeof(MainForm));
this.toolStrip1 = new System.Windows.Forms.ToolStrip();
this.newToolStripButton = new
System.Windows.Forms.ToolStripButton();
this.openToolStripButton = new
System.Windows.Forms.ToolStripButton();
this.saveToolStripButton = new
System.Windows.Forms.ToolStripButton();
this.printToolStripButton = new
System.Windows.Forms.ToolStripButton();
this.toolStripSeparator = new
System.Windows.Forms.ToolStripSeparator();
this.cutToolStripButton = new
System.Windows.Forms.ToolStripButton();
this.copyToolStripButton = new
System.Windows.Forms.ToolStripButton();
this.pasteToolStripButton = new
System.Windows.Forms.ToolStripButton();
this.toolStripSeparator1 = new
System.Windows.Forms.ToolStripSeparator();
this.helpToolStripButton = new
System.Windows.Forms.ToolStripButton();
this.toolStripButton1 = new System.Windows.Forms.ToolStripButton();
this.mainMenuStrip1 = new System.Windows.Forms.MenuStrip();
this.File = new System.Windows.Forms.ToolStripMenuItem();
this.openToolStripMenuItem = new
System.Windows.Forms.ToolStripMenuItem();
this.toolStripSeparator2 = new
System.Windows.Forms.ToolStripSeparator();
this.Dokument = new System.Windows.Forms.ToolStripMenuItem();
this.arveToolStripMenuItem = new
System.Windows.Forms.ToolStripMenuItem();
this.WareHouse = new System.Windows.Forms.ToolStripMenuItem();
this.Personnel = new System.Windows.Forms.ToolStripMenuItem();
this.Payroll = new System.Windows.Forms.ToolStripMenuItem();
this.FixedAssets = new System.Windows.Forms.ToolStripMenuItem();
this.Supplies = new System.Windows.Forms.ToolStripMenuItem();
this.GeneralLedger = new System.Windows.Forms.ToolStripMenuItem();
this.Manufacturing = new System.Windows.Forms.ToolStripMenuItem();
this.PointOfSale = new System.Windows.Forms.ToolStripMenuItem();
this.CardTerminal = new System.Windows.Forms.ToolStripMenuItem();
this.Rent = new System.Windows.Forms.ToolStripMenuItem();
this.WayBill = new System.Windows.Forms.ToolStripMenuItem();
this.CustomerRelationManagement = new
System.Windows.Forms.ToolStripMenuItem();
this.toolStripSeparator8 = new
System.Windows.Forms.ToolStripSeparator();
this.printToolStripMenuItem = new
System.Windows.Forms.ToolStripMenuItem();
this.printPreviewToolStripMenuItem = new
System.Windows.Forms.ToolStripMenuItem();
this.toolStripSeparator4 = new
System.Windows.Forms.ToolStripSeparator();
this.exitToolStripMenuItem = new
System.Windows.Forms.ToolStripMenuItem();
this.NewUserToolStripMenuItem = new
System.Windows.Forms.ToolStripMenuItem();
this.List = new System.Windows.Forms.ToolStripMenuItem();
this.Konto = new System.Windows.Forms.ToolStripMenuItem();
this.klientToolStripMenuItem = new
System.Windows.Forms.ToolStripMenuItem();
this.artikkelToolStripMenuItem = new
System.Windows.Forms.ToolStripMenuItem();
this.summaToolStripMenuItem = new
System.Windows.Forms.ToolStripMenuItem();
this.põhivaraToolStripMenuItem = new
System.Windows.Forms.ToolStripMenuItem();
this.väikevahendToolStripMenuItem = new
System.Windows.Forms.ToolStripMenuItem();
this.toolStripSeparator3 = new
System.Windows.Forms.ToolStripSeparator();
this.kliendiLiikToolStripMenuItem = new
System.Windows.Forms.ToolStripMenuItem();
this.artikliLiikToolStripMenuItem = new
System.Windows.Forms.ToolStripMenuItem();
this.Classifier = new System.Windows.Forms.ToolStripMenuItem();
this.objektToolStripMenuItem = new
System.Windows.Forms.ToolStripMenuItem();
this.subjektToolStripMenuItem = new
System.Windows.Forms.ToolStripMenuItem();
this.allikasToolStripMenuItem = new
System.Windows.Forms.ToolStripMenuItem();
this.eelarveArtikkelToolStripMenuItem = new
System.Windows.Forms.ToolStripMenuItem();
this.Edit = new System.Windows.Forms.ToolStripMenuItem();
this.undoToolStripMenuItem = new
System.Windows.Forms.ToolStripMenuItem();
this.redoToolStripMenuItem = new
System.Windows.Forms.ToolStripMenuItem();
this.toolStripSeparator5 = new
System.Windows.Forms.ToolStripSeparator();
this.cutToolStripMenuItem = new
System.Windows.Forms.ToolStripMenuItem();
this.copyToolStripMenuItem = new
System.Windows.Forms.ToolStripMenuItem();
this.pasteToolStripMenuItem = new
System.Windows.Forms.ToolStripMenuItem();
this.toolStripSeparator6 = new
System.Windows.Forms.ToolStripSeparator();
this.selectAllToolStripMenuItem = new
System.Windows.Forms.ToolStripMenuItem();
this.Action = new System.Windows.Forms.ToolStripMenuItem();
this.Report = new System.Windows.Forms.ToolStripMenuItem();
this.tasumataArveToolStripMenuItem = new
System.Windows.Forms.ToolStripMenuItem();
this.dokumendiRegister1 = new
System.Windows.Forms.ToolStripMenuItem();
this.Window = new System.Windows.Forms.ToolStripMenuItem();
this.Setup = new System.Windows.Forms.ToolStripMenuItem();
this.customizeToolStripMenuItem = new
System.Windows.Forms.ToolStripMenuItem();
this.optionsToolStripMenuItem = new
System.Windows.Forms.ToolStripMenuItem();
this.väljundvormiMuutmineToolStripMenuItem = new
System.Windows.Forms.ToolStripMenuItem();
this.Help = new System.Windows.Forms.ToolStripMenuItem();
this.contentsToolStripMenuItem = new
System.Windows.Forms.ToolStripMenuItem();
this.indexToolStripMenuItem = new
System.Windows.Forms.ToolStripMenuItem();
this.searchToolStripMenuItem = new
System.Windows.Forms.ToolStripMenuItem();
this.toolStripSeparator7 = new
System.Windows.Forms.ToolStripSeparator();
this.aboutToolStripMenuItem = new
System.Windows.Forms.ToolStripMenuItem();
this.toolStrip1.SuspendLayout();
this.mainMenuStrip1.SuspendLayout();
this.SuspendLayout();
//
// toolStrip1
//
this.toolStrip1.Items.AddRange(new
System.Windows.Forms.ToolStripItem[]
{
this.newToolStripButton,
this.openToolStripButton,
this.saveToolStripButton,
this.printToolStripButton,
this.toolStripSeparator,
this.cutToolStripButton,
this.copyToolStripButton,
this.pasteToolStripButton,
this.toolStripSeparator1,
this.helpToolStripButton,
this.toolStripButton1});
this.toolStrip1.Location = new System.Drawing.Point(0, 24);
this.toolStrip1.Name = "toolStrip1";
this.toolStrip1.Size = new System.Drawing.Size(644, 25);
this.toolStrip1.TabIndex = 1;
this.toolStrip1.Text = "toolStrip1";
//
// newToolStripButton
//
this.newToolStripButton.DisplayStyle =
System.Windows.Forms.ToolStripItemDisplayStyle.Image;
this.newToolStripButton.Image =
((System.Drawing.Image)(resources.GetObject("newToolStripButton.Image")));
this.newToolStripButton.ImageTransparentColor =
System.Drawing.Color.Magenta;
this.newToolStripButton.Name = "newToolStripButton";
this.newToolStripButton.Size = new System.Drawing.Size(23, 22);
this.newToolStripButton.Text = "&New";
//
// openToolStripButton
//
this.openToolStripButton.DisplayStyle =
System.Windows.Forms.ToolStripItemDisplayStyle.Image;
this.openToolStripButton.Image =
((System.Drawing.Image)(resources.GetObject("openToolStripButton.Image")));
this.openToolStripButton.ImageTransparentColor =
System.Drawing.Color.Magenta;
this.openToolStripButton.Name = "openToolStripButton";
this.openToolStripButton.Size = new System.Drawing.Size(23, 22);
this.openToolStripButton.Text = "&Open";
//
// saveToolStripButton
//
this.saveToolStripButton.DisplayStyle =
System.Windows.Forms.ToolStripItemDisplayStyle.Image;
this.saveToolStripButton.Image =
((System.Drawing.Image)(resources.GetObject("saveToolStripButton.Image")));
this.saveToolStripButton.ImageTransparentColor =
System.Drawing.Color.Magenta;
this.saveToolStripButton.Name = "saveToolStripButton";
this.saveToolStripButton.Size = new System.Drawing.Size(23, 22);
this.saveToolStripButton.Text = "&Save";
//
// printToolStripButton
//
this.printToolStripButton.DisplayStyle =
System.Windows.Forms.ToolStripItemDisplayStyle.Image;
this.printToolStripButton.Image =
((System.Drawing.Image)(resources.GetObject("printToolStripButton.Image")));
this.printToolStripButton.ImageTransparentColor =
System.Drawing.Color.Magenta;
this.printToolStripButton.Name = "printToolStripButton";
this.printToolStripButton.Size = new System.Drawing.Size(23, 22);
this.printToolStripButton.Text = "&Print";
//
// toolStripSeparator
//
this.toolStripSeparator.Name = "toolStripSeparator";
this.toolStripSeparator.Size = new System.Drawing.Size(6, 25);
//
// cutToolStripButton
//
this.cutToolStripButton.DisplayStyle =
System.Windows.Forms.ToolStripItemDisplayStyle.Image;
this.cutToolStripButton.Image =
((System.Drawing.Image)(resources.GetObject("cutToolStripButton.Image")));
this.cutToolStripButton.ImageTransparentColor =
System.Drawing.Color.Magenta;
this.cutToolStripButton.Name = "cutToolStripButton";
this.cutToolStripButton.Size = new System.Drawing.Size(23, 22);
this.cutToolStripButton.Text = "C&ut";
//
// copyToolStripButton
//
this.copyToolStripButton.DisplayStyle =
System.Windows.Forms.ToolStripItemDisplayStyle.Image;
this.copyToolStripButton.Image =
((System.Drawing.Image)(resources.GetObject("copyToolStripButton.Image")));
this.copyToolStripButton.ImageTransparentColor =
System.Drawing.Color.Magenta;
this.copyToolStripButton.Name = "copyToolStripButton";
this.copyToolStripButton.Size = new System.Drawing.Size(23, 22);
this.copyToolStripButton.Text = "&Copy";
//
// pasteToolStripButton
//
this.pasteToolStripButton.DisplayStyle =
System.Windows.Forms.ToolStripItemDisplayStyle.Image;
this.pasteToolStripButton.Image =
((System.Drawing.Image)(resources.GetObject("pasteToolStripButton.Image")));
this.pasteToolStripButton.ImageTransparentColor =
System.Drawing.Color.Magenta;
this.pasteToolStripButton.Name = "pasteToolStripButton";
this.pasteToolStripButton.Size = new System.Drawing.Size(23, 22);
this.pasteToolStripButton.Text = "&Paste";
//
// toolStripSeparator1
//
this.toolStripSeparator1.Name = "toolStripSeparator1";
this.toolStripSeparator1.Size = new System.Drawing.Size(6, 25);
//
// helpToolStripButton
//
this.helpToolStripButton.DisplayStyle =
System.Windows.Forms.ToolStripItemDisplayStyle.Image;
this.helpToolStripButton.Image =
((System.Drawing.Image)(resources.GetObject("helpToolStripButton.Image")));
this.helpToolStripButton.ImageTransparentColor =
System.Drawing.Color.Magenta;
this.helpToolStripButton.Name = "helpToolStripButton";
this.helpToolStripButton.Size = new System.Drawing.Size(23, 22);
this.helpToolStripButton.Text = "He&lp";
//
// toolStripButton1
//
this.toolStripButton1.DisplayStyle =
System.Windows.Forms.ToolStripItemDisplayStyle.Image;
this.toolStripButton1.Image =
global::Eetasoft.Eeva.Windows.Forms.Properties.Resources.newtext;
this.toolStripButton1.ImageTransparentColor =
System.Drawing.Color.Magenta;
this.toolStripButton1.Name = "toolStripButton1";
this.toolStripButton1.Size = new System.Drawing.Size(23, 22);
this.toolStripButton1.Text = "toolStripButton1";
//
// mainMenuStrip1
//
this.mainMenuStrip1.Items.AddRange(new
System.Windows.Forms.ToolStripItem[] {
this.File,
this.List,
this.Classifier,
this.Edit,
this.Action,
this.Report,
this.Window,
this.Setup,
this.Help});
this.mainMenuStrip1.Location = new System.Drawing.Point(0, 0);
this.mainMenuStrip1.MdiWindowListItem = this.Window;
this.mainMenuStrip1.Name = "mainMenuStrip1";
this.mainMenuStrip1.Size = new System.Drawing.Size(644, 24);
this.mainMenuStrip1.TabIndex = 3;
this.mainMenuStrip1.Text = "menuStrip1";
//
// File
//
this.File.DropDownItems.AddRange(new
System.Windows.Forms.ToolStripItem[] {
this.openToolStripMenuItem,
this.toolStripSeparator2,
this.Dokument,
this.WareHouse,
this.Personnel,
this.Payroll,
this.FixedAssets,
this.Supplies,
this.GeneralLedger,
this.Manufacturing,
this.PointOfSale,
this.CardTerminal,
this.Rent,
this.WayBill,
this.CustomerRelationManagement,
this.toolStripSeparator8,
this.printToolStripMenuItem,
this.printPreviewToolStripMenuItem,
this.toolStripSeparator4,
this.exitToolStripMenuItem,
this.NewUserToolStripMenuItem});
this.File.Name = "File";
this.File.Size = new System.Drawing.Size(35, 20);
this.File.Text = "&Fail";
//
// openToolStripMenuItem
//
this.openToolStripMenuItem.Image =
((System.Drawing.Image)(resources.GetObject("openToolStripMenuItem.Image")));
this.openToolStripMenuItem.ImageTransparentColor =
System.Drawing.Color.Magenta;
this.openToolStripMenuItem.Name = "openToolStripMenuItem";
this.openToolStripMenuItem.ShortcutKeys =
((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Control |
System.Windows.Forms.Keys.O)));
this.openToolStripMenuItem.Size = new System.Drawing.Size(196, 22);
this.openToolStripMenuItem.Text = "Ava ettevõte";
//
// toolStripSeparator2
//
this.toolStripSeparator2.Name = "toolStripSeparator2";
this.toolStripSeparator2.Size = new System.Drawing.Size(193, 6);
//
// Dokument
//
this.Dokument.DropDownItems.AddRange(new
System.Windows.Forms.ToolStripItem[] {
this.arveToolStripMenuItem});
this.Dokument.Name = "Dokument";
this.Dokument.Size = new System.Drawing.Size(196, 22);
this.Dokument.Text = "&Dokument";
//
// arveToolStripMenuItem
//
this.arveToolStripMenuItem.Image =
global::Eetasoft.Eeva.Windows.Forms.Properties.Resources.newtext;
this.arveToolStripMenuItem.Name = "arveToolStripMenuItem";
this.arveToolStripMenuItem.ShortcutKeyDisplayString = "Ctrl+E";
this.arveToolStripMenuItem.ShortcutKeys =
((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Control |
System.Windows.Forms.Keys.E)));
this.arveToolStripMenuItem.Size = new System.Drawing.Size(146, 22);
this.arveToolStripMenuItem.Text = "Arve";
this.arveToolStripMenuItem.Click += new
System.EventHandler(this.arveToolStripMenuItem_Click);
//
// WareHouse
//
this.WareHouse.Name = "WareHouse";
this.WareHouse.Size = new System.Drawing.Size(196, 22);
this.WareHouse.Text = "&Ladu";
//
// Personnel
//
this.Personnel.Name = "Personnel";
this.Personnel.Size = new System.Drawing.Size(196, 22);
this.Personnel.Text = "&Kaader";
//
// Payroll
//
this.Payroll.Name = "Payroll";
this.Payroll.Size = new System.Drawing.Size(196, 22);
this.Payroll.Text = "&Palk";
//
// FixedAssets
//
this.FixedAssets.Name = "FixedAssets";
this.FixedAssets.Size = new System.Drawing.Size(196, 22);
this.FixedAssets.Text = "Põ&hivara";
//
// Supplies
//
this.Supplies.Name = "Supplies";
this.Supplies.Size = new System.Drawing.Size(196, 22);
this.Supplies.Text = "&Väikevahend";
//
// GeneralLedger
//
this.GeneralLedger.Name = "GeneralLedger";
this.GeneralLedger.Size = new System.Drawing.Size(196, 22);
this.GeneralLedger.Text = "Pea&raamat";
//
// Manufacturing
//
this.Manufacturing.Name = "Manufacturing";
this.Manufacturing.Size = new System.Drawing.Size(196, 22);
this.Manufacturing.Text = "&Tootmine";
//
// PointOfSale
//
this.PointOfSale.Name = "PointOfSale";
this.PointOfSale.Size = new System.Drawing.Size(196, 22);
this.PointOfSale.Text = "Ka&ssasüsteem";
//
// CardTerminal
//
this.CardTerminal.Name = "CardTerminal";
this.CardTerminal.Size = new System.Drawing.Size(196, 22);
this.CardTerminal.Text = "Kaarditer&minal";
//
// Rent
//
this.Rent.Name = "Rent";
this.Rent.Size = new System.Drawing.Size(196, 22);
this.Rent.Text = "Ãoüriar&vestus";
//
// WayBill
//
this.WayBill.Name = "WayBill";
this.WayBill.Size = new System.Drawing.Size(196, 22);
this.WayBill.Text = "S&õiduleht";
//
// CustomerRelationManagement
//
this.CustomerRelationManagement.Name =
"CustomerRelationManagement";
this.CustomerRelationManagement.Size = new System.Drawing.Size(196,
22);
this.CustomerRelationManagement.Text = "Klie&ndihaldus";
//
// toolStripSeparator8
//
this.toolStripSeparator8.Name = "toolStripSeparator8";
this.toolStripSeparator8.Size = new System.Drawing.Size(193, 6);
//
// printToolStripMenuItem
//
this.printToolStripMenuItem.Image =
((System.Drawing.Image)(resources.GetObject("printToolStripMenuItem.Image")));
this.printToolStripMenuItem.ImageTransparentColor =
System.Drawing.Color.Magenta;
this.printToolStripMenuItem.Name = "printToolStripMenuItem";
this.printToolStripMenuItem.ShortcutKeys =
((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Control |
System.Windows.Forms.Keys.P)));
this.printToolStripMenuItem.Size = new System.Drawing.Size(196,
22);
this.printToolStripMenuItem.Text = "&Print";
//
// printPreviewToolStripMenuItem
//
this.printPreviewToolStripMenuItem.Image =
((System.Drawing.Image)(resources.GetObject("printPreviewToolStripMenuItem.Image")));
this.printPreviewToolStripMenuItem.ImageTransparentColor =
System.Drawing.Color.Magenta;
this.printPreviewToolStripMenuItem.Name =
"printPreviewToolStripMenuItem";
this.printPreviewToolStripMenuItem.Size = new
System.Drawing.Size(196,
22);
this.printPreviewToolStripMenuItem.Text = "Print Pre&view";
//
// toolStripSeparator4
//
this.toolStripSeparator4.Name = "toolStripSeparator4";
this.toolStripSeparator4.Size = new System.Drawing.Size(193, 6);
//
// exitToolStripMenuItem
//
this.exitToolStripMenuItem.Name = "exitToolStripMenuItem";
this.exitToolStripMenuItem.Size = new System.Drawing.Size(196, 22);
this.exitToolStripMenuItem.Text = "Töö lõpp &x";
this.exitToolStripMenuItem.Click += new
System.EventHandler(this.FileExitBar_Click);
//
// NewUserToolStripMenuItem
//
this.NewUserToolStripMenuItem.Name = "NewUserToolStripMenuItem";
this.NewUserToolStripMenuItem.ShortcutKeys =
((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Shift |
System.Windows.Forms.Keys.F2)));
this.NewUserToolStripMenuItem.Size = new System.Drawing.Size(196,
22);
this.NewUserToolStripMenuItem.Text = "Uus kasutaja";
this.NewUserToolStripMenuItem.Click += new
System.EventHandler(this.NewUser_Click);
//
// List
//
this.List.DropDownItems.AddRange(new
System.Windows.Forms.ToolStripItem[] {
this.Konto,
this.klientToolStripMenuItem,
this.artikkelToolStripMenuItem,
this.summaToolStripMenuItem,
this.põhivaraToolStripMenuItem,
this.väikevahendToolStripMenuItem,
this.toolStripSeparator3,
this.kliendiLiikToolStripMenuItem,
this.artikliLiikToolStripMenuItem});
this.List.Name = "List";
this.List.Size = new System.Drawing.Size(55, 20);
this.List.Text = "&Nimekiri";
//
// Konto
//
this.Konto.Name = "Konto";
this.Konto.ShortcutKeyDisplayString = "Ctrl+B";
this.Konto.ShortcutKeys =
((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Control |
System.Windows.Forms.Keys.B)));
this.Konto.Size = new System.Drawing.Size(159, 22);
this.Konto.Text = "Ko&nto";
this.Konto.Click += new System.EventHandler(this.Konto_Click);
//
// klientToolStripMenuItem
//
this.klientToolStripMenuItem.Name = "klientToolStripMenuItem";
this.klientToolStripMenuItem.ShortcutKeyDisplayString = "Ctrl+K";
this.klientToolStripMenuItem.ShortcutKeys =
((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Control |
System.Windows.Forms.Keys.K)));
this.klientToolStripMenuItem.Size = new System.Drawing.Size(159,
22);
this.klientToolStripMenuItem.Text = "&Klient";
this.klientToolStripMenuItem.Click += new
System.EventHandler(this.Klient_Click);
//
// artikkelToolStripMenuItem
//
this.artikkelToolStripMenuItem.Name = "artikkelToolStripMenuItem";
this.artikkelToolStripMenuItem.ShortcutKeyDisplayString = "Ctrl+D";
this.artikkelToolStripMenuItem.ShortcutKeys =
((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Control |
System.Windows.Forms.Keys.D)));
this.artikkelToolStripMenuItem.Size = new System.Drawing.Size(159,
22);
this.artikkelToolStripMenuItem.Text = "&Artikkel";
this.artikkelToolStripMenuItem.Click += new
System.EventHandler(this.Artikkel_Click);
//
// summaToolStripMenuItem
//
this.summaToolStripMenuItem.Name = "summaToolStripMenuItem";
this.summaToolStripMenuItem.Size = new System.Drawing.Size(159,
22);
this.summaToolStripMenuItem.Text = "&Summa";
this.summaToolStripMenuItem.Click += new
System.EventHandler(this.Summa_Click);
//
// põhivaraToolStripMenuItem
//
this.põhivaraToolStripMenuItem.Name =
"põhivaraToolStripMenuItem";
this.põhivaraToolStripMenuItem.Size = new System.Drawing.Size(159,
22);
this.põhivaraToolStripMenuItem.Text = "Põhi&vara";
this.põhivaraToolStripMenuItem.Click += new
System.EventHandler(this.Pohivara_Click);
//
// väikevahendToolStripMenuItem
//
this.väikevahendToolStripMenuItem.Name =
"väikevahendToolStripMenuItem";
this.väikevahendToolStripMenuItem.Size = new
System.Drawing.Size(159,
22);
this.väikevahendToolStripMenuItem.Text = "Väi&evahend";
//
// toolStripSeparator3
//
this.toolStripSeparator3.Name = "toolStripSeparator3";
this.toolStripSeparator3.Size = new System.Drawing.Size(156, 6);
//
// kliendiLiikToolStripMenuItem
//
this.kliendiLiikToolStripMenuItem.Name =
"kliendiLiikToolStripMenuItem";
this.kliendiLiikToolStripMenuItem.Size = new
System.Drawing.Size(159,
22);
this.kliendiLiikToolStripMenuItem.Text = "K&liendi liik";
//
// artikliLiikToolStripMenuItem
//
this.artikliLiikToolStripMenuItem.Name =
"artikliLiikToolStripMenuItem";
this.artikliLiikToolStripMenuItem.Size = new
System.Drawing.Size(159,
22);
this.artikliLiikToolStripMenuItem.Text = "A&rtikli liik";
//
// Classifier
//
this.Classifier.DropDownItems.AddRange(new
System.Windows.Forms.ToolStripItem[] {
this.objektToolStripMenuItem,
this.subjektToolStripMenuItem,
this.allikasToolStripMenuItem,
this.eelarveArtikkelToolStripMenuItem});
this.Classifier.Name = "Classifier";
this.Classifier.Size = new System.Drawing.Size(82, 20);
this.Classifier.Text = "K&lassifikaator";
//
// objektToolStripMenuItem
//
this.objektToolStripMenuItem.Name = "objektToolStripMenuItem";
this.objektToolStripMenuItem.Size = new System.Drawing.Size(167,
22);
this.objektToolStripMenuItem.Text = "&1 Objekt";
//
// subjektToolStripMenuItem
//
this.subjektToolStripMenuItem.Name = "subjektToolStripMenuItem";
this.subjektToolStripMenuItem.Size = new System.Drawing.Size(167,
22);
this.subjektToolStripMenuItem.Text = "&2 Subjekt";
//
// allikasToolStripMenuItem
//
this.allikasToolStripMenuItem.Name = "allikasToolStripMenuItem";
this.allikasToolStripMenuItem.Size = new System.Drawing.Size(167,
22);
this.allikasToolStripMenuItem.Text = "&3 Allikas";
//
// eelarveArtikkelToolStripMenuItem
//
this.eelarveArtikkelToolStripMenuItem.Name =
"eelarveArtikkelToolStripMenuItem";
this.eelarveArtikkelToolStripMenuItem.Size = new
System.Drawing.Size(167, 22);
this.eelarveArtikkelToolStripMenuItem.Text = "&4 Eelarve artikkel";
//
// Edit
//
this.Edit.DropDownItems.AddRange(new
System.Windows.Forms.ToolStripItem[] {
this.undoToolStripMenuItem,
this.redoToolStripMenuItem,
this.toolStripSeparator5,
this.cutToolStripMenuItem,
this.copyToolStripMenuItem,
this.pasteToolStripMenuItem,
this.toolStripSeparator6,
this.selectAllToolStripMenuItem});
this.Edit.Name = "Edit";
this.Edit.Size = new System.Drawing.Size(59, 20);
this.Edit.Text = "&Paranda";
//
// undoToolStripMenuItem
//
this.undoToolStripMenuItem.Name = "undoToolStripMenuItem";
this.undoToolStripMenuItem.ShortcutKeys =
((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Control |
System.Windows.Forms.Keys.Z)));
this.undoToolStripMenuItem.Size = new System.Drawing.Size(150, 22);
this.undoToolStripMenuItem.Text = "&Undo";
//
// redoToolStripMenuItem
//
this.redoToolStripMenuItem.Name = "redoToolStripMenuItem";
this.redoToolStripMenuItem.ShortcutKeys =
((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Control |
System.Windows.Forms.Keys.Y)));
this.redoToolStripMenuItem.Size = new System.Drawing.Size(150, 22);
this.redoToolStripMenuItem.Text = "&Redo";
//
// toolStripSeparator5
//
this.toolStripSeparator5.Name = "toolStripSeparator5";
this.toolStripSeparator5.Size = new System.Drawing.Size(147, 6);
//
// cutToolStripMenuItem
//
this.cutToolStripMenuItem.Image =
((System.Drawing.Image)(resources.GetObject("cutToolStripMenuItem.Image")));
this.cutToolStripMenuItem.ImageTransparentColor =
System.Drawing.Color.Magenta;
this.cutToolStripMenuItem.Name = "cutToolStripMenuItem";
this.cutToolStripMenuItem.ShortcutKeys =
((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Control |
System.Windows.Forms.Keys.X)));
this.cutToolStripMenuItem.Size = new System.Drawing.Size(150, 22);
this.cutToolStripMenuItem.Text = "Cu&t";
//
// copyToolStripMenuItem
//
this.copyToolStripMenuItem.Image =
((System.Drawing.Image)(resources.GetObject("copyToolStripMenuItem.Image")));
this.copyToolStripMenuItem.ImageTransparentColor =
System.Drawing.Color.Magenta;
this.copyToolStripMenuItem.Name = "copyToolStripMenuItem";
this.copyToolStripMenuItem.ShortcutKeys =
((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Control |
System.Windows.Forms.Keys.C)));
this.copyToolStripMenuItem.Size = new System.Drawing.Size(150, 22);
this.copyToolStripMenuItem.Text = "&Copy";
//
// pasteToolStripMenuItem
//
this.pasteToolStripMenuItem.Image =
((System.Drawing.Image)(resources.GetObject("pasteToolStripMenuItem.Image")));
this.pasteToolStripMenuItem.ImageTransparentColor =
System.Drawing.Color.Magenta;
this.pasteToolStripMenuItem.Name = "pasteToolStripMenuItem";
this.pasteToolStripMenuItem.ShortcutKeys =
((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Control |
System.Windows.Forms.Keys.V)));
this.pasteToolStripMenuItem.Size = new System.Drawing.Size(150,
22);
this.pasteToolStripMenuItem.Text = "&Paste";
//
// toolStripSeparator6
//
this.toolStripSeparator6.Name = "toolStripSeparator6";
this.toolStripSeparator6.Size = new System.Drawing.Size(147, 6);
//
// selectAllToolStripMenuItem
//
this.selectAllToolStripMenuItem.Name =
"selectAllToolStripMenuItem";
this.selectAllToolStripMenuItem.Size = new System.Drawing.Size(150,
22);
this.selectAllToolStripMenuItem.Text = "Select &All";
//
// Action
//
this.Action.Name = "Action";
this.Action.Size = new System.Drawing.Size(60, 20);
this.Action.Text = "&Tegevus";
//
// Report
//
this.Report.DropDownItems.AddRange(new
System.Windows.Forms.ToolStripItem[] {
this.tasumataArveToolStripMenuItem,
this.dokumendiRegister1});
this.Report.Name = "Report";
this.Report.Size = new System.Drawing.Size(60, 20);
this.Report.Text = "Ar&uanne";
//
// tasumataArveToolStripMenuItem
//
this.tasumataArveToolStripMenuItem.Name =
"tasumataArveToolStripMenuItem";
this.tasumataArveToolStripMenuItem.Size = new
System.Drawing.Size(177,
22);
this.tasumataArveToolStripMenuItem.Text = "Tasumata arve";
this.tasumataArveToolStripMenuItem.Click += new
System.EventHandler(this.UnPaidInvoiceClick);
//
// dokumendiRegister1
//
this.dokumendiRegister1.Name = "dokumendiRegister1";
this.dokumendiRegister1.Size = new System.Drawing.Size(177, 22);
this.dokumendiRegister1.Text = "Dokumendi register";
this.dokumendiRegister1.Click += new
System.EventHandler(this.dokumendiRegister1_Click);
//
// Window
//
this.Window.Name = "Window";
this.Window.Size = new System.Drawing.Size(43, 20);
this.Window.Text = "Ak&en";
//
// Setup
//
this.Setup.DropDownItems.AddRange(new
System.Windows.Forms.ToolStripItem[] {
this.customizeToolStripMenuItem,
this.optionsToolStripMenuItem,
this.väljundvormiMuutmineToolStripMenuItem});
this.Setup.Name = "Setup";
this.Setup.Size = new System.Drawing.Size(60, 20);
this.Setup.Text = "&Seadista";
//
// customizeToolStripMenuItem
//
this.customizeToolStripMenuItem.Name =
"customizeToolStripMenuItem";
this.customizeToolStripMenuItem.Size = new System.Drawing.Size(195,
22);
this.customizeToolStripMenuItem.Text = "&Customize";
//
// optionsToolStripMenuItem
//
this.optionsToolStripMenuItem.Name = "optionsToolStripMenuItem";
this.optionsToolStripMenuItem.Size = new System.Drawing.Size(195,
22);
this.optionsToolStripMenuItem.Text = "&Options";
//
// väljundvormiMuutmineToolStripMenuItem
//
this.väljundvormiMuutmineToolStripMenuItem.Name =
"väljundvormiMuutmineToolStripMenuItem";
this.väljundvormiMuutmineToolStripMenuItem.Size = new
System.Drawing.Size(195, 22);
this.väljundvormiMuutmineToolStripMenuItem.Text = "Väljundvormi
muutmine";
this.väljundvormiMuutmineToolStripMenuItem.Click += new
System.EventHandler(this.ValjundVormiMuutmine_Click);
//
// Help
//
this.Help.DropDownItems.AddRange(new
System.Windows.Forms.ToolStripItem[] {
this.contentsToolStripMenuItem,
this.indexToolStripMenuItem,
this.searchToolStripMenuItem,
this.toolStripSeparator7,
this.aboutToolStripMenuItem});
this.Help.Name = "Help";
this.Help.Size = new System.Drawing.Size(34, 20);
this.Help.Text = "Ab&i";
//
// contentsToolStripMenuItem
//
this.contentsToolStripMenuItem.Name = "contentsToolStripMenuItem";
this.contentsToolStripMenuItem.Size = new System.Drawing.Size(129,
22);
this.contentsToolStripMenuItem.Text = "&Contents";
//
// indexToolStripMenuItem
//
this.indexToolStripMenuItem.Name = "indexToolStripMenuItem";
this.indexToolStripMenuItem.Size = new System.Drawing.Size(129,
22);
this.indexToolStripMenuItem.Text = "&Index";
//
// searchToolStripMenuItem
//
this.searchToolStripMenuItem.Name = "searchToolStripMenuItem";
this.searchToolStripMenuItem.Size = new System.Drawing.Size(129,
22);
this.searchToolStripMenuItem.Text = "&Search";
//
// toolStripSeparator7
//
this.toolStripSeparator7.Name = "toolStripSeparator7";
this.toolStripSeparator7.Size = new System.Drawing.Size(126, 6);
//
// aboutToolStripMenuItem
//
this.aboutToolStripMenuItem.Name = "aboutToolStripMenuItem";
this.aboutToolStripMenuItem.Size = new System.Drawing.Size(129,
22);
this.aboutToolStripMenuItem.Text = "&About...";
//
// MainForm
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.BackColor = System.Drawing.SystemColors.Window;
this.BackgroundImage =
((System.Drawing.Image)(resources.GetObject("$this.BackgroundImage")));
this.ClientSize = new System.Drawing.Size(644, 396);
this.Controls.Add(this.toolStrip1);
this.Controls.Add(this.mainMenuStrip1);
this.Icon =
((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
this.IsMdiContainer = true;
this.KeyPreview = false;
this.Name = "MainForm";
this.StartPosition = System.Windows.Forms.FormStartPosition.Manual;
this.Text = "Eetasoft Eeva";
this.toolStrip1.ResumeLayout(false);
this.toolStrip1.PerformLayout();
this.mainMenuStrip1.ResumeLayout(false);
this.mainMenuStrip1.PerformLayout();
this.ResumeLayout(false);
this.PerformLayout();
}
#endregion
private System.Windows.Forms.ToolStrip toolStrip1;
private System.Windows.Forms.ToolStripButton newToolStripButton;
private System.Windows.Forms.ToolStripButton openToolStripButton;
private System.Windows.Forms.ToolStripButton saveToolStripButton;
private System.Windows.Forms.ToolStripButton printToolStripButton;
private System.Windows.Forms.ToolStripSeparator toolStripSeparator;
private System.Windows.Forms.ToolStripButton cutToolStripButton;
private System.Windows.Forms.ToolStripButton copyToolStripButton;
private System.Windows.Forms.ToolStripButton pasteToolStripButton;
private System.Windows.Forms.ToolStripSeparator toolStripSeparator1;
private System.Windows.Forms.ToolStripButton helpToolStripButton;
private System.Windows.Forms.ToolStripButton toolStripButton1;
private System.Windows.Forms.MenuStrip mainMenuStrip1;
private System.Windows.Forms.ToolStripMenuItem File;
private System.Windows.Forms.ToolStripMenuItem openToolStripMenuItem;
private System.Windows.Forms.ToolStripSeparator toolStripSeparator2;
private System.Windows.Forms.ToolStripMenuItem
printToolStripMenuItem;
private System.Windows.Forms.ToolStripMenuItem
printPreviewToolStripMenuItem;
private System.Windows.Forms.ToolStripSeparator toolStripSeparator4;
private System.Windows.Forms.ToolStripMenuItem exitToolStripMenuItem;
private System.Windows.Forms.ToolStripMenuItem List;
private System.Windows.Forms.ToolStripMenuItem Classifier;
private System.Windows.Forms.ToolStripMenuItem Edit;
private System.Windows.Forms.ToolStripMenuItem undoToolStripMenuItem;
private System.Windows.Forms.ToolStripMenuItem redoToolStripMenuItem;
private System.Windows.Forms.ToolStripSeparator toolStripSeparator5;
private System.Windows.Forms.ToolStripMenuItem cutToolStripMenuItem;
private System.Windows.Forms.ToolStripMenuItem copyToolStripMenuItem;
private System.Windows.Forms.ToolStripMenuItem
pasteToolStripMenuItem;
private System.Windows.Forms.ToolStripSeparator toolStripSeparator6;
private System.Windows.Forms.ToolStripMenuItem
selectAllToolStripMenuItem;
private System.Windows.Forms.ToolStripMenuItem Setup;
private System.Windows.Forms.ToolStripMenuItem
customizeToolStripMenuItem;
private System.Windows.Forms.ToolStripMenuItem
optionsToolStripMenuItem;
private System.Windows.Forms.ToolStripMenuItem Help;
private System.Windows.Forms.ToolStripMenuItem
contentsToolStripMenuItem;
private System.Windows.Forms.ToolStripMenuItem
indexToolStripMenuItem;
private System.Windows.Forms.ToolStripMenuItem
searchToolStripMenuItem;
private System.Windows.Forms.ToolStripSeparator toolStripSeparator7;
private System.Windows.Forms.ToolStripMenuItem
aboutToolStripMenuItem;
private System.Windows.Forms.ToolStripMenuItem Dokument;
private System.Windows.Forms.ToolStripMenuItem arveToolStripMenuItem;
private System.Windows.Forms.ToolStripMenuItem WareHouse;
private System.Windows.Forms.ToolStripMenuItem Personnel;
private System.Windows.Forms.ToolStripMenuItem Payroll;
private System.Windows.Forms.ToolStripMenuItem FixedAssets;
private System.Windows.Forms.ToolStripMenuItem Supplies;
private System.Windows.Forms.ToolStripMenuItem GeneralLedger;
private System.Windows.Forms.ToolStripMenuItem Manufacturing;
private System.Windows.Forms.ToolStripMenuItem PointOfSale;
private System.Windows.Forms.ToolStripMenuItem Konto;
private System.Windows.Forms.ToolStripMenuItem
klientToolStripMenuItem;
private System.Windows.Forms.ToolStripMenuItem
artikkelToolStripMenuItem;
private System.Windows.Forms.ToolStripMenuItem
summaToolStripMenuItem;
private System.Windows.Forms.ToolStripMenuItem
põhivaraToolStripMenuItem;
private System.Windows.Forms.ToolStripMenuItem CardTerminal;
private System.Windows.Forms.ToolStripMenuItem Rent;
private System.Windows.Forms.ToolStripMenuItem WayBill;
private System.Windows.Forms.ToolStripMenuItem
CustomerRelationManagement;
private System.Windows.Forms.ToolStripSeparator toolStripSeparator8;
private System.Windows.Forms.ToolStripMenuItem
NewUserToolStripMenuItem;
private System.Windows.Forms.ToolStripMenuItem
väikevahendToolStripMenuItem;
private System.Windows.Forms.ToolStripSeparator toolStripSeparator3;
private System.Windows.Forms.ToolStripMenuItem
kliendiLiikToolStripMenuItem;
private System.Windows.Forms.ToolStripMenuItem
artikliLiikToolStripMenuItem;
private System.Windows.Forms.ToolStripMenuItem
objektToolStripMenuItem;
private System.Windows.Forms.ToolStripMenuItem
subjektToolStripMenuItem;
private System.Windows.Forms.ToolStripMenuItem
allikasToolStripMenuItem;
private System.Windows.Forms.ToolStripMenuItem
eelarveArtikkelToolStripMenuItem;
private System.Windows.Forms.ToolStripMenuItem Action;
private System.Windows.Forms.ToolStripMenuItem Report;
private System.Windows.Forms.ToolStripMenuItem Window;
private System.Windows.Forms.ToolStripMenuItem
väljundvormiMuutmineToolStripMenuItem;
private System.Windows.Forms.ToolStripMenuItem
tasumataArveToolStripMenuItem;
private System.Windows.Forms.ToolStripMenuItem dokumendiRegister1;
}
My child form is based on businessform class. This class designer file:
partial class BusinessForm
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be
disposed; otherwise, false.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Windows Form Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
System.ComponentModel.ComponentResourceManager resources = new
System.ComponentModel.ComponentResourceManager(typeof(BusinessForm));
this.menuStrip2 = new System.Windows.Forms.MenuStrip();
this.File = new System.Windows.Forms.ToolStripMenuItem();
this.newToolStripMenuItem = new
System.Windows.Forms.ToolStripMenuItem();
this.saveToolStripMenuItem = new
System.Windows.Forms.ToolStripMenuItem();
this.sulgecToolStripMenuItem = new
System.Windows.Forms.ToolStripMenuItem();
this.menuStrip2.SuspendLayout();
this.SuspendLayout();
//
// menuStrip2
//
this.menuStrip2.Items.AddRange(new
System.Windows.Forms.ToolStripItem[]
{
this.File});
this.menuStrip2.Location = new System.Drawing.Point(0, 0);
this.menuStrip2.Name = "menuStrip2";
this.menuStrip2.RenderMode =
System.Windows.Forms.ToolStripRenderMode.System;
this.menuStrip2.Size = new System.Drawing.Size(292, 24);
this.menuStrip2.TabIndex = 0;
this.menuStrip2.Text = "menuStrip1";
//
// File
//
this.File.DropDownItems.AddRange(new
System.Windows.Forms.ToolStripItem[] {
this.newToolStripMenuItem,
this.saveToolStripMenuItem,
this.sulgecToolStripMenuItem});
this.File.MergeAction = System.Windows.Forms.MergeAction.MatchOnly;
this.File.Name = "File";
this.File.Size = new System.Drawing.Size(35, 20);
this.File.Text = "&Fail";
//
// newToolStripMenuItem
//
this.newToolStripMenuItem.Image =
((System.Drawing.Image)(resources.GetObject("newToolStripMenuItem.Image")));
this.newToolStripMenuItem.ImageTransparentColor =
System.Drawing.Color.Magenta;
this.newToolStripMenuItem.MergeAction =
System.Windows.Forms.MergeAction.Insert;
this.newToolStripMenuItem.MergeIndex = 1;
this.newToolStripMenuItem.Name = "newToolStripMenuItem";
this.newToolStripMenuItem.ShortcutKeys =
((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Control |
System.Windows.Forms.Keys.N)));
this.newToolStripMenuItem.Size = new System.Drawing.Size(152, 22);
this.newToolStripMenuItem.Text = "&New";
//
// saveToolStripMenuItem
//
this.saveToolStripMenuItem.Image =
((System.Drawing.Image)(resources.GetObject("saveToolStripMenuItem.Image")));
this.saveToolStripMenuItem.ImageTransparentColor =
System.Drawing.Color.Magenta;
this.saveToolStripMenuItem.MergeAction =
System.Windows.Forms.MergeAction.Insert;
this.saveToolStripMenuItem.MergeIndex = 2;
this.saveToolStripMenuItem.Name = "saveToolStripMenuItem";
this.saveToolStripMenuItem.ShortcutKeys =
((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Control |
System.Windows.Forms.Keys.S)));
this.saveToolStripMenuItem.Size = new System.Drawing.Size(152, 22);
this.saveToolStripMenuItem.Text = "&Save";
//
// sulgecToolStripMenuItem
//
this.sulgecToolStripMenuItem.MergeAction =
System.Windows.Forms.MergeAction.Insert;
this.sulgecToolStripMenuItem.MergeIndex = 3;
this.sulgecToolStripMenuItem.Name = "sulgecToolStripMenuItem";
this.sulgecToolStripMenuItem.Size = new System.Drawing.Size(152,
22);
this.sulgecToolStripMenuItem.Text = "Sulge &c";
this.sulgecToolStripMenuItem.Click += new
System.EventHandler(this.FileClose_Click);
//
// BusinessForm
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.ClientSize = new System.Drawing.Size(292, 273);
this.Controls.Add(this.menuStrip2);
this.MainMenuStrip = this.menuStrip2;
this.Name = "BusinessForm";
this.Text = "BusinessForm";
this.menuStrip2.ResumeLayout(false);
this.menuStrip2.PerformLayout();
this.ResumeLayout(false);
this.PerformLayout();
}
#endregion
private System.Windows.Forms.MenuStrip menuStrip2;
private System.Windows.Forms.ToolStripMenuItem File;
private System.Windows.Forms.ToolStripMenuItem newToolStripMenuItem;
private System.Windows.Forms.ToolStripMenuItem saveToolStripMenuItem;
private System.Windows.Forms.ToolStripMenuItem
sulgecToolStripMenuItem;
}
"Steve Barnett" <noname@xxxxxxxxxxxx> wrote in message
news:eH4$Ut8MHHA.3552@xxxxxxxxxxxxxxxxxxxxxxx
Check that the caption is exactly the same for the parent and child
menu
items you expect to merge. If the captions don't match, the merge does
not
happen. For example, if the MDI parent has a caption of "File" and the
MDI
Child "&File", the merge fails.
By way of a test, I set-up a menu strip on the parent form with:
Text: &File
MergeAction: Append
MergeIndex: -1
and on the child form:
Text: &File
MergeAction: Match Only
MergeIndex: -1
Text: &Child
MergeAction: Insert
MergeIndex: 1
This merged without any problems. When I changed the parent caption to
"File" the merge failed.
Steve
"Andrus" <kobruleht2@xxxxxx> wrote in message
news:enWILm1MHHA.4708@xxxxxxxxxxxxxxxxxxxxxxx
In my C# Winforms 2.0 application I have
Main form MenuStrip:
AllowMerge: True
Main form Menustrip File menu:
MergeAction: MatchOnly
MergeIndex: -1
MDI Child form base class MenuStrip: AllowMerge: true
MDI Child form base class MenuStrip File Menu:
MergeAction: MatchOnly
MergeIndex: -1
MDI Child form base class MenuStrip File Menu New item:
MergeAction: Insert
MergeIndex: 1
When I open child window, child menustrip is not merged Main form.
Any idea what causes this ?
Andrus.
.
- References:
- MDI child menu not merged
- From: Andrus
- Re: MDI child menu not merged
- From: Steve Barnett
- Re: MDI child menu not merged
- From: Andrus
- Re: MDI child menu not merged
- From: Steve Barnett
- Re: MDI child menu not merged
- From: Andrus
- Re: MDI child menu not merged
- From: Steve Barnett
- MDI child menu not merged
- Prev by Date: Re: Looking for an idea
- Next by Date: Component, Properties window and Object Collection Editor
- Previous by thread: Re: MDI child menu not merged
- Next by thread: Re: MDI child menu not merged
- Index(es):