473,586 Members | 2,702 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 ContextMenuEdit or.Popup

MenuItemPasteSp ecial.MenuItems .Add(0, New MenuItem("Local e", AddressOf
HandlesMenuItem PasteSpecialIte ms_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 893

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

Similar topics

8
6577
by: filip stas | last post by:
How do i add references during runtime?
0
1375
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 indicates that it should be there but there's no items appearing in it. (ie a small indicator arrow is there showing there should be a sub menu but nothing...
4
3494
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 don't get the problem with context menus attached to list boxes etc. Ive also seen a noticeable slow down in speed when the menu attempts to hide...
10
21285
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 sender As System.Object, _ ByVal e As System.EventArgs) _ Handles mnuTopics_Show.Select Dim mShowMenuItem As MenuItem mShowMenuItem =...
4
3429
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 mic(1) = New MenuItem("b") mic(1).Index = 2
0
847
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 = MenuItemPasteSpecial.MenuItems.Add(New MenuItem("Locale", AddressOf HandlesMenuItemPasteSpecial_Click)) 'MenuItemPasteSpecial.MenuItems(jnk).MergeType =...
0
998
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 When that form is activated they merge OK but the File MenuItem is the one from the childform so if it is clicked, the popup on the mdiform is...
0
1025
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 MenuItem("Menu item text", "menuitemvalue", "imageurl", "navigateurl"); Menu menu = (Menu) lvSidebar.FindControl("mnuSidebar");
0
3804
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 a point. This does get an OnClientClick event onto the menu items but it causes the codebehind ItemCommand for the Menu to become unwired. It seems...
0
7839
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
8200
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
0
8338
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
0
8215
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
0
6610
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
1
5710
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
5390
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3864
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
1448
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.