Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Error setting up menu item
Message
Information générale
Forum:
ASP.NET
Catégorie:
The Mere Mortals .NET Framework
Divers
Thread ID:
01332675
Message ID:
01332807
Vues:
6
This message has been marked as the solution to the initial question of the thread.
Linda,

>I added the code for the Security Setup Menu Bar exactly as it is in the help file. When I try to compile, I get the following error:
>'OakLeaf.MM.Main.Windows.Forms.mmMenuStrip' does not contain a definition for 'MenuItems'
>
>The error occurs on this line of code:
>
>               this.mmMenuExtender.SetMenuSecuritySetup(this.MenuStrip.MenuItems, false)
>
>
>When I check the Intellisense, there is no choice for this.MenuStrip.MenuItems. I went through the instructions step-by-step. I tried adding "using OakLeaf.MM.Main.Security;" to the Mainform but that didn't help. What am I missing?

I recommend downloading the latest MM .NET Dev Guide. We updated this topic a while back. Your code should look something like this:
private void FileSecuritySetupBar_Click(object sender, System.EventArgs e)
{
   if (this.FileSecuritySetupBar.Checked)
   {
      this.FileSecuritySetupBar.Checked = false;
      mmAppDesktop.SecuritySetupMode = false;
      this.mmMenuStripExtender.SetMenuSecuritySetup(this.MenuStrip.Items, false);
   }
   else
   {
      this.FileSecuritySetupBar.Checked = true;
      mmAppDesktop.SecuritySetupMode = true;
      this.mmMenuStripExtender.SetMenuSecuritySetup(this.MenuStrip.Items, true);
   }
}
Best Regards,
Kevin McNeish
Eight-Time .NET MVP
VFP and iOS Author, Speaker & Trainer
Oak Leaf Enterprises, Inc.
Chief Architect, MM Framework
http://www.oakleafsd.com
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform