EFileTahi-A
Contributor
Is is possible to retrieve the menu items names?
I can make it list the Menu items .Text:
Unfortunatey the System.Windows.Forms.MenuItem does not have the ".Name" propperty...
Is there any other way to make a loop where i can get a list of all menuItems names?
I can make it list the Menu items .Text:
Code:
foreach (System.Windows.Forms.MenuItem cCtrl in mainMenu.mainMenu1.MenuItems)
{
foreach (System.Windows.Forms.MenuItem cCtrlSub in cCtrl.MenuItems)
{
MessageBox.Show(cCtrlSub.Text.ToString());
}
}
Unfortunatey the System.Windows.Forms.MenuItem does not have the ".Name" propperty...
Is there any other way to make a loop where i can get a list of all menuItems names?