Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Standard Widget Toolkit (SWT) » MouseHover and Tooltip question
MouseHover and Tooltip question [message #441204] Thu, 12 August 2004 03:34 Go to next message
Eclipse UserFriend
Originally posted by: trevor.campbell.kaz.com.au

Is it OK to set a tooltip value inside a mouseHover event?

I have the following code to show a tip when the mouse hovers over a
particular place on a map painted on an org.eclipse.swt.widgets.Canvas.

_canvas.addMouseTrackListener(new MouseTrackAdapter() {
public void mouseHover(MouseEvent e) {
_canvas.setToolTipText(""); //I've also tried null here;
for (Iterator iter = _wayPoints.keySet().iterator();
iter.hasNext();) {
Point p = (Point) iter.next();
if (Math.abs(p.x - e.x) < 5 && Math.abs(p.y - e.y) <
5) {
Waypoint wp = (Waypoint) _wayPoints.get(p);
_canvas.setToolTipText(wp.getName());
break;
}
}
}
});

This works well in Windows, but not in Linux/GTK.

I'm not sure if what I'm doing is legal or if it's a bug in SWT/GTK

Trev
Re: MouseHover and Tooltip question [message #441211 is a reply to message #441204] Thu, 12 August 2004 10:01 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: v.j.b

what's the actual problem? Are you getting invalid access exceptions or does
it 'just not work'?
Re: MouseHover and Tooltip question [message #441629 is a reply to message #441211] Wed, 18 August 2004 01:39 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: trevor.campbell.kaz.com.au

varname wrote:

> what's the actual problem? Are you getting invalid access exceptions or does
> it 'just not work'?

It just doesn't work. Vary rarely a tooltip will pop up but not in the
right spot, the rest of the time I see no tip at all.
Re: MouseHover and Tooltip question [message #442801 is a reply to message #441629] Mon, 13 September 2004 16:55 Go to previous message
Steve Northover is currently offline Steve NorthoverFriend
Messages: 1636
Registered: July 2009
Senior Member
Please enter a bugzilla report with a stand alone example that fails. I'd
like to make this work on every platform.

"Trev" <trevor.campbell@kaz.com.au> wrote in message
news:cfubvt$tl8$1@eclipse.org...
> varname wrote:
>
> > what's the actual problem? Are you getting invalid access exceptions or
does
> > it 'just not work'?
>
> It just doesn't work. Vary rarely a tooltip will pop up but not in the
> right spot, the rest of the time I see no tip at all.
>
Previous Topic:Browser on MAC OSX
Next Topic:I want to use Swing on my PocketPC.
Goto Forum:
  


Current Time: Sat Apr 27 03:11:30 GMT 2024

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

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

Back to the top