Underline letter in a button

  • Thread starter Thread starter dfoster
  • Start date Start date
D

dfoster

In my form, I have four buttons that do different tasks. The
button.Text field is set as &Next Project, so the N will be underlined.
In the preview of the form, it shows up with the N underlined. Yet
when I run my program, the text shows up with no underlining. I have
checked and made sure that I am not changing the text value anywhere
else, so I am not sure what is wrong. Any help will be appricated.
Thanks.

Dave
 
The underline is turn off by default in XP until you press the Alt Key. You
can change this behavior by opening the Display properties, on the
appearance tab click on effects and then uncheck the underline entry.
 
Mel said:
The underline is turn off by default in XP until you press the Alt Key.
You can change this behavior by opening the Display properties, on the
appearance tab click on effects and then uncheck the underline entry.

Is that true? Go to Start/Run, look at the Browse button. (Windows XP SP2).
I have that option currently checked and it still shows there.
 
In my form, I have four buttons that do different tasks. The
button.Text field is set as &Next Project, so the N will be underlined.
In the preview of the form, it shows up with the N underlined. Yet
when I run my program, the text shows up with no underlining. I have
checked and made sure that I am not changing the text value anywhere
else, so I am not sure what is wrong. Any help will be appricated.

There's a desktop setting to "hide underline for hotkeys until user
presses ALT key". Perhaps that is turned on?
 
Dave,

I created a quick test project and the same thing is happening to me.
Even when "UseMnemonic" is set to true, the letter is not underlined.
The mnemonic is still active and can be reached by pressing "shift" +
the mnemonic letter, and in the designer the underline is there, but
not when run.

For what it is worth I have found at least one other post with the same
problem here

http://www.eggheadcafe.com/community/aspnet/2/32799/no-accesskey-property-for.aspx

I am starting to feel like this is a bug in .NET. Are you working in
1.0, 1.1, or 2.0. I am coding in VS2005 with .NET 2.0. If this is a bug
and you really need this feature it would be possible to hack it. Good
luck, if I find anything else I'll post it.
 
ok, so I took too long to write my post. I'm reading the ones above and
they are correct. When I press alt with my test app in focus the
mnemonic letter shows it's underline.
 

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

Back
Top