ContextMenu anomaly?...cascading menus won't popup 
Author Message
 ContextMenu anomaly?...cascading menus won't popup

    I have a Context Menu bound to my DataGrid. One of the MenuItems within
my menu is called mnuSaveToFolder.  Every time a user right-clicks my
datagrid I I build an array of MenuItems that I add to my mnuSaveToFolder
menu items collection so that a cascading menu is built on the fly.
    The problem I'm having is that the cascading menu seems to get built
fine, but when I put my mouse on the mnuSaveToFolder item the cascading menu
doesn't always pop out.  Sometimes it does, sometimes not.  I know the menu
items are there cause if I do a MenuItems.Count I get back the number I
would expect.  Even the little black arrow that depicts another menu level
is there, but nothing comes up.  Is this a bug with the menuitems control?
Any help will be appreciated.

Thanks



Tue, 08 Feb 2005 01:55:40 GMT  
 ContextMenu anomaly?...cascading menus won't popup
Quote:

> Even the little black arrow that depicts another menu level
> is there, but nothing comes up.

LOL!
I had the same problem and i was sure that this behavior was a virus<g>
Until I find the following workaround

   menuItem.Enabled = false;
   menuItem.MenuItems.Clear();
   // do the additions
   if ( menuItem.IsParent ) {
    menuItem.Enabled = true;
   }

Quote:
> Is this a bug with the menuitems control?

I don't know, maybe
After I found this workaround, I did not search it any further


Tue, 08 Feb 2005 07:26:15 GMT  
 ContextMenu anomaly?...cascading menus won't popup
Man, this was the weirdest thing, and I thought I tried everything.  That's
a nice little hack you've got there, and it works great.  Thanks a lot!

--Matt



Quote:
> > Even the little black arrow that depicts another menu level
> > is there, but nothing comes up.
> LOL!
> I had the same problem and i was sure that this behavior was a virus<g>
> Until I find the following workaround

>    menuItem.Enabled = false;
>    menuItem.MenuItems.Clear();
>    // do the additions
>    if ( menuItem.IsParent ) {
>     menuItem.Enabled = true;
>    }

> > Is this a bug with the menuitems control?

> I don't know, maybe
> After I found this workaround, I did not search it any further



Tue, 08 Feb 2005 21:48:08 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. Why won't my popup menu pop up

2. sys tray popup menu won't go

3. Cascading PopUp Menu (URGENT)

4. HELP : Popup menu doesn't popup ??

5. MDI Menu with Child form Popup menu's

6. Popup menus on form called from a popup menu

7. WIN-95 Popup-menu

8. Popup ContextMenu

9. show a shortcut menu / popup menu / context menu

10. Can I modify Word's popup menu?

11. Stop browser's popup menu

12. Help: How to disable Window's Popup menu

 

 
Powered by phpBB® Forum Software