Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Standard Widget Toolkit (SWT) » Ampersand not displaying in ToolTip
Ampersand not displaying in ToolTip [message #447214] Thu, 09 December 2004 16:01 Go to next message
Kalman Hazins is currently offline Kalman HazinsFriend
Messages: 76
Registered: July 2009
Member
I can't get the ampersand ("&") character to show up in the tooltip of a
HyperLink widget. When I do link.getToolTipText() - it's there, but it's not
showing ...

Any ideas?

Thanx,

- Kalman
Re: Ampersand not displaying in ToolTip [message #447216 is a reply to message #447214] Thu, 09 December 2004 16:50 Go to previous messageGo to next message
Kalman Hazins is currently offline Kalman HazinsFriend
Messages: 76
Registered: July 2009
Member
Someone just e-mailed me that you need to replace it with 3 ampersand inside
the tooltip ... How intuitive :)


"Kalman" <kalman@zikal.com> wrote in message
news:cp9smg$qqq$1@www.eclipse.org...
> I can't get the ampersand ("&") character to show up in the tooltip of a
> HyperLink widget. When I do link.getToolTipText() - it's there, but it's
not
> showing ...
>
> Any ideas?
>
> Thanx,
>
> - Kalman
>
>
Re: Ampersand not displaying in ToolTip [message #447241 is a reply to message #447216] Thu, 09 December 2004 19:33 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: v.j.b

wouldn't that be just standard escaping practices? C, aswell as Java, do
this aswell, see '\\' for instance in pathnames on windows platforms.


"Kalman" <kalman@zikal.com> wrote in message
news:cp9vig$4v9$1@www.eclipse.org...
> Someone just e-mailed me that you need to replace it with 3 ampersand
inside
> the tooltip ... How intuitive :)
>
>
> "Kalman" <kalman@zikal.com> wrote in message
> news:cp9smg$qqq$1@www.eclipse.org...
> > I can't get the ampersand ("&") character to show up in the tooltip of a
> > HyperLink widget. When I do link.getToolTipText() - it's there, but it's
> not
> > showing ...
> >
> > Any ideas?
> >
> > Thanx,
> >
> > - Kalman
> >
> >
>
>
Re: Ampersand not displaying in ToolTip [message #447244 is a reply to message #447241] Thu, 09 December 2004 20:51 Go to previous messageGo to next message
Kalman Hazins is currently offline Kalman HazinsFriend
Messages: 76
Registered: July 2009
Member
I have no problem with escaping things. I do have a problem of not
mentioning anywhere that this needs to be done.

Sun's Javadoc is much more thorough - there is no question. SWT is getting
there though ...

"varname" <v@j.b> wrote in message news:cpa9bb$49k$1@www.eclipse.org...
> wouldn't that be just standard escaping practices? C, aswell as Java, do
> this aswell, see '\\' for instance in pathnames on windows platforms.
>
>
> "Kalman" <kalman@zikal.com> wrote in message
> news:cp9vig$4v9$1@www.eclipse.org...
> > Someone just e-mailed me that you need to replace it with 3 ampersand
> inside
> > the tooltip ... How intuitive :)
> >
> >
> > "Kalman" <kalman@zikal.com> wrote in message
> > news:cp9smg$qqq$1@www.eclipse.org...
> > > I can't get the ampersand ("&") character to show up in the tooltip of
a
> > > HyperLink widget. When I do link.getToolTipText() - it's there, but
it's
> > not
> > > showing ...
> > >
> > > Any ideas?
> > >
> > > Thanx,
> > >
> > > - Kalman
> > >
> > >
> >
> >
>
>
Re: Ampersand not displaying in ToolTip [message #447256 is a reply to message #447244] Fri, 10 December 2004 18:26 Go to previous messageGo to next message
Mani Ghamari is currently offline Mani GhamariFriend
Messages: 33
Registered: July 2009
Member
This behaviour IS documented at seveal different places in the SWT
documentation.
The Ampersand is the default "Mnemonic Indicator" in SWT, whereever a
Mnemonic is applicable.
For instance, see the api docs for:

Button.setText(String string)

or

MenuItem.setText(String string)

Having a look at those, it was obvious for me what the problem is, YET,
I agree that the SWT documentation should become more organized!

regards,

Mani Ghamari

"Kalman" <kalman@zikal.com> wrote in message
news:cpadmo$hf7$1@www.eclipse.org...
>I have no problem with escaping things. I do have a problem of not
> mentioning anywhere that this needs to be done.
>
> Sun's Javadoc is much more thorough - there is no question. SWT is getting
> there though ...
>
> "varname" <v@j.b> wrote in message news:cpa9bb$49k$1@www.eclipse.org...
>> wouldn't that be just standard escaping practices? C, aswell as Java, do
>> this aswell, see '\\' for instance in pathnames on windows platforms.
>>
>>
>> "Kalman" <kalman@zikal.com> wrote in message
>> news:cp9vig$4v9$1@www.eclipse.org...
>> > Someone just e-mailed me that you need to replace it with 3 ampersand
>> inside
>> > the tooltip ... How intuitive :)
>> >
>> >
>> > "Kalman" <kalman@zikal.com> wrote in message
>> > news:cp9smg$qqq$1@www.eclipse.org...
>> > > I can't get the ampersand ("&") character to show up in the tooltip
>> > > of
> a
>> > > HyperLink widget. When I do link.getToolTipText() - it's there, but
> it's
>> > not
>> > > showing ...
>> > >
>> > > Any ideas?
>> > >
>> > > Thanx,
>> > >
>> > > - Kalman
>> > >
>> > >
>> >
>> >
>>
>>
>
>
Re: Ampersand not displaying in ToolTip [message #1006160 is a reply to message #447214] Wed, 30 January 2013 09:51 Go to previous messageGo to next message
bmeyns Mising name is currently offline bmeyns Mising nameFriend
Messages: 1
Registered: January 2013
Junior Member
Small update: you need to replace the ampersand with TWO ampersands (BIRT), so:
=myText.replace("&", "&&");

Re: Ampersand not displaying in ToolTip [message #1006308 is a reply to message #447214] Wed, 30 January 2013 18:44 Go to previous messageGo to next message
Vasanthi Sathyanarayanan is currently offline Vasanthi SathyanarayananFriend
Messages: 7
Registered: January 2013
Location: Bangalore, India
Junior Member
I remember facing a similar problem in windows OS. As far as i remember, i used escape sequence before ampersand to get it displayed on the tooptip.

Regards,
Vasanthi
Re: Ampersand not displaying in ToolTip [message #1187531 is a reply to message #447214] Fri, 15 November 2013 06:37 Go to previous message
Kondal Kolipaka is currently offline Kondal KolipakaFriend
Messages: 9
Registered: November 2010
Junior Member
Replace ampersand(&) by double ampersand(&&). This works for all platforms.

Look at the eclipse bug below, which was resolved.
https://bugs.eclipse.org/bugs/show_bug.cgi?id=188271

Best Regards,
Kondal Kolipaka
Previous Topic:Error after launching exported RCP e4 Application (Exception while activating instance...)
Next Topic:Drag and Drop from TreeViewer to TableViewer
Goto Forum:
  


Current Time: Thu Apr 25 20:08:45 GMT 2024

Powered by FUDForum. Page generated in 0.03169 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top