Sorry to post this but I'm having a bit of brain freeze. Trying to print some simple text to a window using a standard textgadget, but when I try and get it to display the & character it doesn't display it, just a space where it should be. Am I missing something or is it a bug?
Any help appreciated.
Thanks
Print the "&" character
Re: Help or is this a bug????
You have to use && in order to display a single & because on Windows,
prefixing characters with an & means that they are meant to be shortcuts (which get underlined).
prefixing characters with an & means that they are meant to be shortcuts (which get underlined).

Blog: Why Does It Suck? (http://whydoesitsuck.com/)
"You can disagree with me as much as you want, but during this talk, by definition, anybody who disagrees is stupid and ugly."
- Linus Torvalds
Re: Help or is this a bug????
Thanks for the explanation and I've noted your advice on posting
Thanks again

-
- Addict
- Posts: 1482
- Joined: Tue Feb 22, 2011 1:16 pm
Re: Help or is this a bug????
So, how do we create a shortcut for the & character?Shield wrote:prefixing characters with an & means that they are meant to be shortcuts (which get underlined)


Microsoft Visual Basic only lasted 7 short years: 1991 to 1998.
PureBasic: Born in 1998 and still going strong to this very day!
PureBasic: Born in 1998 and still going strong to this very day!
-
- Addict
- Posts: 1675
- Joined: Sun Dec 12, 2010 12:36 am
- Location: Somewhere in the midwest
- Contact:
Re: Print the "&" character
My guess is you don't, because by its nature the ampersand (&) is a toggled character which requires a key combination to press.
I don't think you can make shortcuts for any keys on the system that require a Shift+Key combo and its probably why Microsoft chose to do it this way.
If you ever noticed in programs that let you define custom key macros, toggled characters will not show up, as they use the base key character instead.
i.e You can't make Ctrl+Shift+& because it would show up on the system as Ctrl+Shift+7 anyway
I don't think you can make shortcuts for any keys on the system that require a Shift+Key combo and its probably why Microsoft chose to do it this way.
If you ever noticed in programs that let you define custom key macros, toggled characters will not show up, as they use the base key character instead.
i.e You can't make Ctrl+Shift+& because it would show up on the system as Ctrl+Shift+7 anyway
-
- Addict
- Posts: 1482
- Joined: Tue Feb 22, 2011 1:16 pm
Re: Print the "&" character
It was a joke, Zach. 

Microsoft Visual Basic only lasted 7 short years: 1991 to 1998.
PureBasic: Born in 1998 and still going strong to this very day!
PureBasic: Born in 1998 and still going strong to this very day!
-
- Addict
- Posts: 1675
- Joined: Sun Dec 12, 2010 12:36 am
- Location: Somewhere in the midwest
- Contact:
Re: Print the "&" character
I know but, I can't help it...
I'm a literalist
I'm a literalist
Re: Print the "&" character
This has been answered correctly above, but here is an official Microsoft explanation: http://support.microsoft.com/kb/261320
Just for reference.
Just for reference.