Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Standard Widget Toolkit (SWT) » Mouse hover on items in a List
Mouse hover on items in a List [message #446134] Wed, 17 November 2004 16:40 Go to next message
Luc Rochefort is currently offline Luc RochefortFriend
Messages: 8
Registered: July 2009
Junior Member
Hi!

I want to set the tooltip text of my List according to the item on which the
mouse hovers. The item dosn't have to be selected.

Is this thing possible? Any help will be greatly appreciated.
Re: Mouse hover on items in a List [message #446138 is a reply to message #446134] Wed, 17 November 2004 18:20 Go to previous messageGo to next message
Veronika Irvine is currently offline Veronika IrvineFriend
Messages: 1272
Registered: July 2009
Senior Member
If you use Table instead, you can then use Table.getItem(Point).

"Rushman" <rochefort@irosoft.com> wrote in message
news:cnfutd$529$1@www.eclipse.org...
> Hi!
>
> I want to set the tooltip text of my List according to the item on which
> the
> mouse hovers. The item dosn't have to be selected.
>
> Is this thing possible? Any help will be greatly appreciated.
>
>
Re: Mouse hover on items in a List [message #446559 is a reply to message #446134] Fri, 26 November 2004 14:51 Go to previous message
Grant Gayed is currently offline Grant GayedFriend
Messages: 2150
Registered: July 2009
Senior Member
Hi, sorry for the late response,

There is no way to do this with List, but you can use a Table instead with
no header or grid lines, and it will look and behave the same. For examples
of determining the TableItem at a given x,y see:
http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.swt.sni ppets/src/org/eclipse/swt/snippets/Snippet3.java?rev=HEAD&am p;content-type=text/vnd.viewcvs-markup
http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.swt.sni ppets/src/org/eclipse/swt/snippets/Snippet110.java?rev=HEAD& amp;content-type=text/vnd.viewcvs-markup

These examples trigger on MouseDown, but you can just as easily change this
to MouseHover.

Another snippet worth looking at is the displaying of fake tooltips, though
this is not something that you asked about. If you find that setting the
Table's tooltip on MouseHover does not give you a satisfactory result then
you may want to do something like
http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.swt.sni ppets/src/org/eclipse/swt/snippets/Snippet125.java?rev=HEAD& amp;content-type=text/vnd.viewcvs-markup .

Grant

"Rushman" <rochefort@irosoft.com> wrote in message
news:cnfutd$529$1@www.eclipse.org...
> Hi!
>
> I want to set the tooltip text of my List according to the item on which
the
> mouse hovers. The item dosn't have to be selected.
>
> Is this thing possible? Any help will be greatly appreciated.
>
>
Previous Topic:Progress view item
Next Topic:Can/Should a swt.widgets.List have a context menu?
Goto Forum:
  


Current Time: Thu Apr 25 21:37:14 GMT 2024

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

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

Back to the top