473,511 Members | 14,134 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Adding a MenuItem causes a problem

Private Sub ContextMenuEdit_Popup(ByVal sender As Object, ByVal e As
EventArgs) Handles ContextMenuEditor.Popup

MenuItemPasteSpecial.MenuItems.Add(0, New MenuItem("Locale", AddressOf
HandlesMenuItemPasteSpecialItems_Click))

End Sub

PasteSpecial is a submenu of a submenu of the main contextmenu

It has one item in it's menuitems collection but the problem exists with no
such items

PasteSpecial appears in it's menu with the filled in arrow symbol that
indicated there are subitems

This is the only popup event handler

If I include the Add statement above when PasteSpecial is selected the
subMenu does not appear

Actually it appears the first time I open the context menu but only the
first time.

Works OK with the Add statement commented out

Been chasing this for quite a while so I'd appreciate any suggestion to try
something.

Even any unrelated statement of how it is possible for the arrow to appear
and the submenu not open.

Thanks
Nov 21 '05 #1
0 892

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

8
6571
by: filip stas | last post by:
How do i add references during runtime?
0
1369
by: Claire | last post by:
When I run the following code through on the first round, my sub-menu (branched off mnuOpenPorts menuitem) shows a nice list of ports. When it gets run through on the 2nd pass, the sub menu...
4
3485
by: Claire | last post by:
Sorry Ive added this twice (sortof) but if I'd added an addendum to the first one then this would probably have been ignored. This problem affects a ContextMenu attached to a NotifyIcon object. I...
10
21251
by: tmaster | last post by:
When I try to dynamically add a second sub menu item to this ContextMenu item, I get an error 'Specified argument was out of the range of valid values'. Private Sub mnuTopics_Show_Select(ByVal...
4
3421
by: Eric Sabine | last post by:
I've simplified the code to the following. I'm just overlooking something very simple I'm sure. Dim mic() As MenuItem mic = New MenuItem(3) {} mic(0) = New MenuItem("a") mic(0).Index = 1 ...
0
845
by: **Developer** | last post by:
Sorry this is the second post but I had left the most important clue out of the first one. If I only have one MenuItem.Add it works OK! MenuItemPasteSpecial.MenuItems.Clear() jnk =...
0
992
by: **Developer** | last post by:
A MDI form has a MenuItem "File" that contains other MenuItems. A MdiChild form also contains a "File" MenuItem containing other MenuItems. They are both mergetype MergeItems and mergeindex=0...
0
1013
by: Jeff | last post by:
hey asp.net 2.0 I want to add a menu item to a menu on my webpage programatically. I've tryed using the code below, but it doesn't add the menu item to the menu. MenuItem menuItem = new...
0
3800
by: jtencate | last post by:
I am trying to add an OnClientClick event to links in an asp:Menu. I tried using a StaticItemTemplate to bind the MenuItem data to a LinkButton with an OnClientClick attribute. This works fine to...
0
7237
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7137
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7417
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
7074
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
7506
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
1
5063
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
3210
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1572
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
780
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.