Menuitems do not display

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
 
C

Cor Ligthert [MVP]

Active

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

Cor
 
A

active

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()
 
A

active

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
 

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