Regarding Label control Text property (for "&")

I have to name a label as "A & B",but it is getting displayed as "A_B", the same is applicable for button also. since for hotKeys we have to specify the letter with"&". right?. I would be very thankful, if i got the solution.

Thanks in advance

RamBabu

[316 byte] By [RamBabu] at [2007-12-24]
# 1

Hi there.

What you do is you set the UseMnemonic property of the control to False and the 'A & B' will be displayed as 'A & B'

MiasvandenBerg at 2007-10-8 > top of Msdn Tech,Windows Forms,Windows Forms General...
# 2

Hi,

as an additional option, you could go with escaping the '&' character by doubling it:

Label1.Text = "A && B";

Andrej

AndrejTozon at 2007-10-8 > top of Msdn Tech,Windows Forms,Windows Forms General...
# 3
Nice one brother!
MiasvandenBerg at 2007-10-8 > top of Msdn Tech,Windows Forms,Windows Forms General...
# 4
Thanks a loooot friends
RamBabu at 2007-10-8 > top of Msdn Tech,Windows Forms,Windows Forms General...