Updating Menu Items

F

Frank J. Lagattuta

I have a tray icon application that displays a context menu when it is
right clicked. One of the menu items on this context menu is a
submenu. The text of the menu items in this submenu get updated from
time to time, however, when the submenu is popped up the old/original
text always shows. Selecting one of these menu items copies its text
to the clipboard. When I do a paste, the new updated text is pasted
proving that the menu item text has been updated but the display of
the menu item has not. How can I force the menu item display to update
once I have changed the menu item text?

Here is how I set the menuitem text:

string strNewText;
// ... stuff to calc new text ...

this.m_menuItem.Text = strNewText;

I searched for a way to invalidate/update the menu item, but I can't
find anything. I also don't see anything to update the submenu from
the parent menu. Any help is greatly appreciated.

-Frank
 
C

Chad Chisholm

I had the same problem and NEVER found a solution. I'd love to be
notified of a solution.

chad AT osisoft DOT com
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top