BUG: Dynamically Added Submenu Items are not Shown on the ContextMenu of NotifyIcon (814636)
The information in this article applies to:
- Microsoft .NET Framework 1.1
- Microsoft .NET Framework 1.0
SYMPTOMS The first time that you click the menu on the ContextMenu of the notify icon, the submenu appears. However, the second time
that you try this operation, the submenu does not appear. Dynamically added
submenu items that are associated with menu items in a ContextMenu control of the NotifyIcon component are not displayed on the second occasion.
STATUS
Microsoft has confirmed that this is a bug in the Microsoft products that are
listed at the beginning of this article.
WORKAROUNDTo
work around this issue, toggle the Visible property of the MenuItem
object that the submenu is added to.
In places where a submenu item is added dynamically to the ContextMenu component of the NotifyIcon component, add the following code: menuItem.Visible = false;
menuItem.Visible = true; This example assumes that menuItem holds the MenuItem instance that the submenu items have been dynamically added
to. REFERENCESFor more information about NotifyIcon, see the following MSDN documentation:
Modification Type: | Minor | Last Reviewed: | 5/3/2004 |
---|
Keywords: | kbContMenu kbBug kbMenu kbCtrl KB814636 kbAudDeveloper |
---|
|