[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Newsgroup Home]
|
[news.eclipse.platform.swt] Re: Mouse hover on items in a List
|
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.snippets/src/org/eclipse/swt/snippets/Snippet3.java?rev=HEAD&content-type=text/vnd.viewcvs-markup
http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet110.java?rev=HEAD&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.snippets/src/org/eclipse/swt/snippets/Snippet125.java?rev=HEAD&content-type=text/vnd.viewcvs-markup .
Grant
"Rushman" <rochefort@xxxxxxxxxxx> wrote in message
news:cnfutd$529$1@xxxxxxxxxxxxxxxxxx
> 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.
>
>