Author Topic: Syntax for using Ampersand (&) in labels, etc. Ver 16.01 Linux.  (Read 417 times)

Offline Aaron

  • Multiple posting newcomer
  • *
  • Posts: 57
Does anyone know the required syntax for using the '&' character in labels, etc?

Placing one '&' in a label produces a space, two '&' characters produce an underscore.

I did search the manual & forums for this answer.
« Last Edit: April 13, 2017, 12:56:33 am by Aaron »

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 10056
Re: Syntax for using Ampersand (&) in labels, etc.
« Reply #1 on: April 12, 2017, 08:15:16 pm »
What labels? wx, qt, win32, something else?
<debugger plugin maintainer>
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Offline Aaron

  • Multiple posting newcomer
  • *
  • Posts: 57
Re: Syntax for using Ampersand (&) in labels, etc.
« Reply #2 on: April 12, 2017, 08:28:57 pm »
For wxStaticText and wxButtons.

Offline sodev

  • Multiple posting newcomer
  • *
  • Posts: 74
Re: Syntax for using Ampersand (&) in labels, etc.
« Reply #3 on: April 12, 2017, 11:34:27 pm »
Looks like wxWidgets coding issues, not Codeblocks fault.

Offline BlueHazzard

  • Lives here!
  • ****
  • Posts: 1370
Re: Syntax for using Ampersand (&) in labels, etc. Ver 16.01 Linux.
« Reply #4 on: April 14, 2017, 05:26:01 pm »
http://docs.wxwidgets.org/3.0/classwx_menu_item.html

Quote
The label string for the normal menu items (not separators) may include the accelerator which can be used to activate the menu item from keyboard. An accelerator key can be specified using the ampersand & character. In order to embed an ampersand character in the menu item text, the ampersand must be doubled.