A simple DCSAY queston

This forum is for eXpress++ general support.
Post Reply
Message
Author
BruceN
Posts: 280
Joined: Thu Jan 28, 2010 7:46 am
Location: Slidell, LA

A simple DCSAY queston

#1 Post by BruceN »

I have a customer whose name is Heads & Tails (don't ask my why - they sell UF, FSU, and Bucs gear, here in Tampa). Anyway, sometimes when their name is the value of a variable in a dcsay it shows as Heads_Tails. on a dcget it displays properly.

I assume xbase is translating the & as something else. How do I have it format right?

again thanks.
There are only 10 kinds of people - those who understand binary and those who don't :)

User avatar
rdonnay
Site Admin
Posts: 4729
Joined: Wed Jan 27, 2010 6:58 pm
Location: Boise, Idaho USA
Contact:

Re: A simple DCSAY queston

#2 Post by rdonnay »

The standard Windows convention is to use two & characters.

Your code should look like this:

Code: Select all

cName := Strtran(cName,'&','&&')

@ x,y DCSAY cName
The eXpress train is coming - and it has more cars.

BruceN
Posts: 280
Joined: Thu Jan 28, 2010 7:46 am
Location: Slidell, LA

Re: A simple DCSAY queston

#3 Post by BruceN »

Curious... Attached is a sceen shot. In a browse the '&' shows properly, but not in a dcsay. Also, if I change the dcsay to a dcget, it displays properly. hmmm
Attachments
screen.jpg
screen.jpg (88.14 KiB) Viewed 9747 times
There are only 10 kinds of people - those who understand binary and those who don't :)

bwolfsohn
Posts: 648
Joined: Thu Jan 28, 2010 7:07 am
Location: Alachua, Florida USA
Contact:

Re: A simple DCSAY queston

#4 Post by bwolfsohn »

Bruce,

I may be oversimplifying it, but i believe this only applies to dcsays, not dcgets, or browse items.. if the word seek had an & in it at the top of the browse, i suspect it too would be affected.
Brian Wolfsohn
Retired and traveling around the country to music festivals in my RV.
OOPS.. Corona Virus, so NOT traveling right now...
http://www.breadmanrises.com
FB travel group: The Breadman Rises

User avatar
rdonnay
Site Admin
Posts: 4729
Joined: Wed Jan 27, 2010 6:58 pm
Location: Boise, Idaho USA
Contact:

Re: A simple DCSAY queston

#5 Post by rdonnay »

DCSAY objects are inherited from the XbpStatic class. These are basically the same as Labels in Windows. The & character follows this rule for menus and labels because the & character is used to underline the "hot key" of a label or menu item because it is a user prompt.

DCGETs and DCBROWSEs are displaying "data" not "prompts", therefore a different rule applies.
The eXpress train is coming - and it has more cars.

BruceN
Posts: 280
Joined: Thu Jan 28, 2010 7:46 am
Location: Slidell, LA

Re: A simple DCSAY queston

#6 Post by BruceN »

I knew there had to be a reason for it... thanks.
There are only 10 kinds of people - those who understand binary and those who don't :)

Post Reply