473,725 Members | 2,053 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

MenuItem mnemonic not showing as underlined

I have derived a class from MenuItem so that I can associate IDs of my
choosing with each item (a la C++).

I have created a ContextMenu in the constructor of an owner draw list box
and added a number of MyMenuItems to it, each with a unique mnemonic (&Item1
e.g.).

When I right click the mouse on my list box, all the menus show up as
intended; the characters I have assigned as mnemonics work, but the mnemonic
character is not underlined! Also, (not surprisingly) the Mnemonic Property
returns the value I assigned.

However, if from MyForm (which contains the list box), I execute the code:

MyLb.ContextMen u.Show( MyLb, new Point( 0, 0 ));

the underlines show up, and will continue to show up when I invoke the menu
with the right click thereafter.

Has anyone got any idea what is going on?

Thanks in advance,
Valerie Hough
Nov 16 '05 #1
0 1717

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

Similar topics

10
2578
by: Lex | last post by:
I am writing a C# app that has a Menu. Some of the menu items will have short cuts that do not exist in the Shortcut enum. I would like the custom shortcuts to appear on the menu but as far as I can tell there is no way to add a short cut that is not in the Shortcut enum. I have my on keyboard hook so I am not worried about the custom shortcut magically working. I just want it to appear nicely formated on the menu. Anyone have any...
1
2660
by: Lex | last post by:
I have a c# app that has a OwnerDrawn menu items. Is there and easy way to use DrawString to draw the underline under the mnemonic character? BTW - I figured out how to detected if we should be showing the underline or not from my draw method: if ((e.State.Equals(DrawItemState.None)) || (e.State.Equals(DrawItemState.Selected)))
3
4090
by: Grant | last post by:
Gday, My form has a text box and a label. The label is next to the textbox and has a mnemonic set for the first letter. My question is how to highlight the textbox when the user selects the mnemonic for the label? Thanks, Grant
6
6222
by: Claus Holm | last post by:
I'm trying to enable a menuitem in the parent form from a mdichild. Rather than making the menuitems public, I'd go for a public method in the parent form to do the change, but when I call the method from the mdichild, I get this error: C:\MyProjects\Visual Studio Projects\Tournament\Forms\frmLogin.cs(69): The name 'test' does not exist in the class or namespace 'Tournament.frmLogin' frmLogin is the mdichild.
0
1387
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 pops up) When I step through the code, I have 5 items in Comports. After adding all the sub menu...
4
3507
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 after the problem occurs. When I build a dynamic submenu on the first time round, it shows a nice...
6
2207
by: Joe Thompson | last post by:
Hi Using VC++ 2003/winform app I added a menu to my main form and then added "&File" as the text of the first item. At design time it appears as expected (the F in File is underlined). At runtime the F is not underlined. I don't see any settings for enabling/disabling this. What am I missing Thank you Joe
2
2166
by: polocar | last post by:
Hi, I'm writing a program using Visual C# 2005 Professional Edition, and I was trying to assign multiple MainMenu objects (one by one, of course) to the same Form (let's suppose 2 MainMenu objects). It is possible (and it's my case) that these 2 MainMenu objects use some different MenuItem objects and some identical MenuItem objects. For example, let's assume that: mainMenu1 contains miFile, miEdit, miHelp mainMenu2 contains miFile,...
4
4320
by: CrystalMorgan | last post by:
I just noticed a strange glitch in a program I have been updating for over a month. I was working on the Menu Bar items today and noticed that the underscore to indicate a hot key was not visible on any of the menu or the drop down menu in runtime environment but look correct in design view. However the underscores on the buttons on the midi screen show as they should. The hot keys on the menu still work (i.e. Hitting Alt F will open...
0
9401
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. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9257
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 captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
9111
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 choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
6011
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 into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4517
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4782
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3221
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 we have to send another system
2
2634
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2157
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.