Items with ( in first character grayed out
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller
-
- Posts: 31
- Joined: Mon Apr 27, 2015 3:09 pm
Items with ( in first character grayed out
In both the pulldown menu and option menu, if the first character in one of my choices is a left paren ( the choice is grayed out and unselectable. To test, just set up a new control and change the choices to:
(Choice 1)
Choice 2
(Choice 3)
You'll see that only Choice 2 is able to be selected. This is on a mac, I haven't tested it on a PC.
Also, the ( is missing in the selections for those 2 items.
(Choice 1)
Choice 2
(Choice 3)
You'll see that only Choice 2 is able to be selected. This is on a mac, I haven't tested it on a PC.
Also, the ( is missing in the selections for those 2 items.
Re: Items with ( in first character grayed out
Hi Matt,
1. welcome to the forum!
2. This is correct behavior!
A left round bracket ( at the beginning of a menuitem indicates that this menuitem is DISABLED, as you have experienced.
You can force the character to appear and be part of your menuitem when you ESCAPE this character with a BACKSLASH.
Then the enigne knows that ( is part of the menuitem!
This should work in your menu:
\(Choice 1)
Choice 2
\(Choice 3)
Best
Klaus
1. welcome to the forum!

2. This is correct behavior!
A left round bracket ( at the beginning of a menuitem indicates that this menuitem is DISABLED, as you have experienced.
You can force the character to appear and be part of your menuitem when you ESCAPE this character with a BACKSLASH.
Then the enigne knows that ( is part of the menuitem!
This should work in your menu:
\(Choice 1)
Choice 2
\(Choice 3)
Best
Klaus
-
- Posts: 31
- Joined: Mon Apr 27, 2015 3:09 pm
Re: Items with ( in first character grayed out
OK great! Thanks!
-
- Posts: 31
- Joined: Mon Apr 27, 2015 3:09 pm
Re: Items with ( in first character grayed out
Next problem is the label for the control has the \ in it. Is there a simple way to avoid that?
-
- Posts: 31
- Joined: Mon Apr 27, 2015 3:09 pm
Re: Items with ( in first character grayed out
OK well I figured out how to do it with a function, but I'm wondering if there is an easier way. Here's what i did:
function corCheckEscape textToCheck
if char 1 to 2 in textToCheck = "\(" then
delete char 1 in textToCheck
end if
return textToCheck
end corCheckEscape
function corCheckEscape textToCheck
if char 1 to 2 in textToCheck = "\(" then
delete char 1 in textToCheck
end if
return textToCheck
end corCheckEscape
Re: Items with ( in first character grayed out
Hi Matt,
well, you MAY do this shorter with some regular expression, but that is still a complete mystery to me
Your function looks great, I would do it this way, too!
Best
Klaus
well, you MAY do this shorter with some regular expression, but that is still a complete mystery to me

Your function looks great, I would do it this way, too!
Best
Klaus
Re: Items with ( in first character grayed out
The documented way to indicate that a character in a menu is a literal instead of a status designator is to double it. (In fact, I wasn't aware of the backslash solution until now.) So if you want to display the first parenthesis, you double it like this:
((Open)
And although it looks strange, to disable it you would add the disabling parenthesis, giving you three:
(((Open)
This works and you get the text you expect in the menuPick parameter without any alterations required. I have to add though that I have never seen a menu item with parentheses and I don't think it's standard behavior.
((Open)
And although it looks strange, to disable it you would add the disabling parenthesis, giving you three:
(((Open)
This works and you get the text you expect in the menuPick parameter without any alterations required. I have to add though that I have never seen a menu item with parentheses and I don't think it's standard behavior.
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com
HyperActive Software | http://www.hyperactivesw.com
-
- Posts: 31
- Joined: Mon Apr 27, 2015 3:09 pm
Re: Items with ( in first character grayed out
I didn't see that documentation anywhere. I will try that.
The reason I have a ( in the first character is because that's in the data. It's a list of vendors, and one of them has that in its name. I have to allow for anything, within reason.
The reason I have a ( in the first character is because that's in the data. It's a list of vendors, and one of them has that in its name. I have to allow for anything, within reason.
Re: Items with ( in first character grayed out
I couldn't find it in a quick search of the dictionary either, but it's in there somewhere. The convention dates back to the beginning of time.
If you're working with company names then yes, your approach makes sense now.
If you're working with company names then yes, your approach makes sense now.
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com
HyperActive Software | http://www.hyperactivesw.com
Re: Items with ( in first character grayed out
Doubling? Really?
Learning something new every day.

Learning something new every day.
PowerDebug http://powerdebug.ahsoftware.net
PowerTools http://www.ahsoftware.net/PowerTools/PowerTools.irev
PowerTools http://www.ahsoftware.net/PowerTools/PowerTools.irev
Re: Items with ( in first character grayed out
Okay, I found it in the user guide and I was half wrong but it still works anyway. Here's what it says:
So it seems that doubling is only supposed to disable "&" and "/" but it seems to work fine with "(" as well. I've always just doubled all the special characters without any problem. Apparently my brain can only hold one rule at a time.To put an & or / character in the text of a menu, double the characters: && or //.
Putting the ( character anywhere in a line disables the menu item. To put a ( character
in a menu item without disabling it, precede it with a backslash: \(.
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com
HyperActive Software | http://www.hyperactivesw.com