How to include ampersand (&) in button text

  • Thread starter Thread starter milop
  • Start date Start date
M

milop

Hello.

How do I set the Text property of a button so that an ampersand (&) is
displayed?

Thanks,

Mike
 
milop said:
Hello.

How do I set the Text property of a button so that an ampersand (&)
is displayed?

IIRC, you should use "Copy && Paste" instead of "Copy & Paste". The
"&&" should display as "&".
 
milop said:
Hello.

How do I set the Text property of a button so that an ampersand (&)
is displayed?

IIRC, you should use "Copy && Paste" instead of "Copy & Paste". The
"&&" should display as "&".
 
milop said:
How do I set the Text property of a button so that an ampersand (&) is
displayed?

The character followed by the "&" character is treated as the control's
mnemonic. If you press the Alt key on the form, this character will be
displayed with an underline. Just write "&&" to display an ampersand
character in the button's text.

BTW: The label control comes with a 'UseMnemonic' property, which, if set
to 'False', will cause every single ampersand character to be displayed on
the label.
 
milop said:
How do I set the Text property of a button so that an ampersand (&) is
displayed?

The character followed by the "&" character is treated as the control's
mnemonic. If you press the Alt key on the form, this character will be
displayed with an underline. Just write "&&" to display an ampersand
character in the button's text.

BTW: The label control comes with a 'UseMnemonic' property, which, if set
to 'False', will cause every single ampersand character to be displayed on
the label.
 
Thanks Herfried.

Herfried K. Wagner said:
The character followed by the "&" character is treated as the control's
mnemonic. If you press the Alt key on the form, this character will be
displayed with an underline. Just write "&&" to display an ampersand
character in the button's text.

BTW: The label control comes with a 'UseMnemonic' property, which, if set
to 'False', will cause every single ampersand character to be displayed on
the label.
 
Thanks Herfried.

Herfried K. Wagner said:
The character followed by the "&" character is treated as the control's
mnemonic. If you press the Alt key on the form, this character will be
displayed with an underline. Just write "&&" to display an ampersand
character in the button's text.

BTW: The label control comes with a 'UseMnemonic' property, which, if set
to 'False', will cause every single ampersand character to be displayed on
the label.
 
Back
Top