Developer forum
cancel
Showing results for 
Search instead for 
Did you mean: 

Ampersand disappearing

Bruce
Booster
How do I stop the ampersand (&) symbol from disappearing in UI_TOOLTIP text? It appears fine in a UI_OUTFIELD, but not in UI_TOOLTIP.
Bruce Walker
http://www.brucepwalker.com
https://www.mindmeister.com/65450406

-- since v8.1 --
AC22 6025 INT Full | macOS Mojave 10 | 3.2 GHz Intel Xeon W | 32 Gb RAM | Radeon Pro Vega 56 8 Gb
13 REPLIES 13

Podolsky
Mentor
Maybe use 'and' instead?

Bruce
Booster
Yes, that had occurred to me...unfortunately space is at a premium in the interface.
Bruce Walker
http://www.brucepwalker.com
https://www.mindmeister.com/65450406

-- since v8.1 --
AC22 6025 INT Full | macOS Mojave 10 | 3.2 GHz Intel Xeon W | 32 Gb RAM | Radeon Pro Vega 56 8 Gb

Barry Kelly
Moderator
Bruce wrote:
Yes, that had occurred to me...unfortunately space is at a premium in the interface.
Tooltips extend beyond the interface window so size should not be an issue - except there is a character limit.
Go past that, there is no warning and the entire interface will just not show.
169 characters by my count.

Other characters show, just not '&' which is interesting.


Barry.

One of the forum moderators.
Versions 6.5 to 25
Dell XPS- i7-6700 @ 3.4Ghz, 16GB ram, GeForce GTX 960 (2GB), Windows 10
Dell Precision 3510 - i7 6820HQ @ 2.70GHz, 16GB RAM, AMD FirePro W5130M, Windows 10

Barry Kelly
Moderator
There is a warning if you check script (although the reported line number is wrong).
And is seems the character limit is for the entire script line - not just the tooltip.


Barry.

One of the forum moderators.
Versions 6.5 to 25
Dell XPS- i7-6700 @ 3.4Ghz, 16GB ram, GeForce GTX 960 (2GB), Windows 10
Dell Precision 3510 - i7 6820HQ @ 2.70GHz, 16GB RAM, AMD FirePro W5130M, Windows 10

Bruce
Booster
I see I must provide a bit more context:

I am using a variable that will change between "Primary" and "Primary & Secondary" depending on what the user has selected. This text will appear as a UI_INFIELD column heading, and also as a UI_TOOLTIP. It is the column heading that I don't have space for - hence the use of "&".
Bruce Walker
http://www.brucepwalker.com
https://www.mindmeister.com/65450406

-- since v8.1 --
AC22 6025 INT Full | macOS Mojave 10 | 3.2 GHz Intel Xeon W | 32 Gb RAM | Radeon Pro Vega 56 8 Gb

Barry Kelly
Moderator
Unfortunately '&' will just not show in the tooltip.
Can you have it say "Primary / Primary and Secondary" or "Primary or Primary and Secondary" in the tooltip instead?
The actual interface can still show the exact text you want.

Barry.

One of the forum moderators.
Versions 6.5 to 25
Dell XPS- i7-6700 @ 3.4Ghz, 16GB ram, GeForce GTX 960 (2GB), Windows 10
Dell Precision 3510 - i7 6820HQ @ 2.70GHz, 16GB RAM, AMD FirePro W5130M, Windows 10

Barry Kelly
Moderator
But wait!
Something just came to the back of my mind.

You can do it if you use a triple &&&.

Barry.

One of the forum moderators.
Versions 6.5 to 25
Dell XPS- i7-6700 @ 3.4Ghz, 16GB ram, GeForce GTX 960 (2GB), Windows 10
Dell Precision 3510 - i7 6820HQ @ 2.70GHz, 16GB RAM, AMD FirePro W5130M, Windows 10

Bruce
Booster
Thanks Barry. I know in other languages (e.g. VBA) you can double-up the ampersand to make it appear...but apparently not in GDL.

No problem - I'll work my may around that.

Cheers
Bruce Walker
http://www.brucepwalker.com
https://www.mindmeister.com/65450406

-- since v8.1 --
AC22 6025 INT Full | macOS Mojave 10 | 3.2 GHz Intel Xeon W | 32 Gb RAM | Radeon Pro Vega 56 8 Gb

Bruce
Booster
I replied too soon: so triple it is. Will still not quite work the way I want (for both tooltip & outfield), but that's ok. I'll figure something out
Bruce Walker
http://www.brucepwalker.com
https://www.mindmeister.com/65450406

-- since v8.1 --
AC22 6025 INT Full | macOS Mojave 10 | 3.2 GHz Intel Xeon W | 32 Gb RAM | Radeon Pro Vega 56 8 Gb

Barry Kelly
Moderator
The outfield and the tooltip can be different.


But if you are using a variable instead of a quoted string, you will just need to create a second variable (can be hidden from users) that has the &&&, that will change as you change the original variable.
So as the user changes the original variable, the second will automatically change as well and will be used for the tooltip.

Barry.

One of the forum moderators.
Versions 6.5 to 25
Dell XPS- i7-6700 @ 3.4Ghz, 16GB ram, GeForce GTX 960 (2GB), Windows 10
Dell Precision 3510 - i7 6820HQ @ 2.70GHz, 16GB RAM, AMD FirePro W5130M, Windows 10

Bruce
Booster
Yes, I had considered this. I was hoping to be more efficient with my code. Oh well.
Bruce Walker
http://www.brucepwalker.com
https://www.mindmeister.com/65450406

-- since v8.1 --
AC22 6025 INT Full | macOS Mojave 10 | 3.2 GHz Intel Xeon W | 32 Gb RAM | Radeon Pro Vega 56 8 Gb

runxel
Mentor
You are still on AC22, Bruce?

In 24 everything seems working.
AC 24 [ger] | Win 10 | Developer of the GDL plugin for Sublime Text |
«Furthermore, I consider that Carth... yearly releases must be destroyed»

Bruce
Booster
Well that's interesting. I am scripting this part in 23. Just did a quick test in 24, and you're right! The ampersand works fine for tooltips.

Thanks for that!
Bruce Walker
http://www.brucepwalker.com
https://www.mindmeister.com/65450406

-- since v8.1 --
AC22 6025 INT Full | macOS Mojave 10 | 3.2 GHz Intel Xeon W | 32 Gb RAM | Radeon Pro Vega 56 8 Gb

Still looking?

Browse more topics

Back to forum

See latest solutions

Accepted solutions

Start a new discussion!