Menuitems do not display

  • Thread starter Thread starter active
  • Start date Start date
A

active

I have a mainmenu menuitem
that contains a Recently Used Files menuitem
If at design time I include a menuitem in the Recently Used Files menuitem
collection it will display OK
If I programmatically add more menuitems to the Recently Used Files menuitem
they show ok

However, if I clear the Recently Used Files menuitem collection
and then add more menuitems they do not display.
What is weird is that even though they do not display the count property
shows that they are added.

Has anyone seen anything like this?

Do you have any suggestions as to what is going on and/or how to fix it?

Thanks
 
Active

that depends how you clear them, can you show us the code how you do that?

Cor
 
Here is some code

Would more help

It's a big routine or I'd show it all



thanks





Friend WithEvents MenuItemRecentlyUsedFiles As System.Windows.Forms.MenuItem


'

'MenuItemRecentlyUsedFiles

'

Me.MenuItemRecentlyUsedFiles.Index = 13

Me.MenuItemRecentlyUsedFiles.MergeOrder = 50

Me.MenuItemRecentlyUsedFiles.MergeType =
System.Windows.Forms.MenuMerge.MergeItems

Me.MenuItemRecentlyUsedFiles.Text = "Recently Used Files"



MenuItemRecentlyUsedFiles.MenuItems.Clear()
 
This is how I add
Tho I've tried other merge ways

M = MenuItemRecentlyUsedFiles.MenuItems.Add(0, New
MenuItem(String.Copy(thePath), AddressOf HandlesRecentlyUsedFileItem_Click))

MenuItemRecentlyUsedFiles.MenuItems(M).MergeOrder = 0

MenuItemRecentlyUsedFiles.MenuItems(M).MergeType = MenuMerge.MergeItems
 
Back
Top