Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Standard Widget Toolkit (SWT) » mouse over clickable region in TableTreeViewer
mouse over clickable region in TableTreeViewer [message #447405] Tue, 14 December 2004 11:47 Go to next message
Rajeev Sudra is currently offline Rajeev SudraFriend
Messages: 30
Registered: July 2009
Member
Dear all,

I have a single column TableTreeViewer (i.e. basically a tree but need to Table lines as may be adding columns in the future). I want to be able able to display a plus "+" icon against each TableTreeItem when I mouse over it if it has actions associated with the item. Single clicking on the plus should display a popup dialog (already in place, currently I display the popup on double click events on the TableTreeViewer). I would like the icon to appear on the left hand side of the TableTreeItem or alternatively as an overlay/floating icon above the TableTreeItem text.

To summarise:
- How do I catch mouse over events on individual TableTreeItems (I know how to get mouse {enter|leave|hover} events for the TableTree control but not its items)
- Can I add a clickable icon to the right of the first columns text (I know about the icon limitation for the first TableTree column as the image space is used to draw the expansion control).
- is it possible to add draw stuff on top of the TableTreeViewer at arbitary coordinates?

Any suggestions on how to achieve this would be great.
Thanks,
Raj
Re: mouse over clickable region in TableTreeViewer [message #447918 is a reply to message #447405] Tue, 21 December 2004 22:54 Go to previous message
Grant Gayed is currently offline Grant GayedFriend
Messages: 2150
Registered: July 2009
Senior Member
Hi Raj,

- You cannot hook listeners directly to TableTreeItems, but instead have to
listen for TableTree events and compute the item yourself. For an example
of this (just substitute MouseHover or MouseMove for MouseDown) see:
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 .
- You can draw on the viewer by adding a Paint listener to the underlying
Table (use TableTreeViewer.getTableTree().getTable())
- You can also use this Paint listener to add a clickable image. Or
alternatively, you can create Button that is a child of the viewer's
underlying Table.

Grant

"Rajeev Sudra" <rsudra@hotmail.com> wrote in message
news:cpmjta$7f4$1@www.eclipse.org...
> Dear all,
>
> I have a single column TableTreeViewer (i.e. basically a tree but need to
Table lines as may be adding columns in the future). I want to be able able
to display a plus "+" icon against each TableTreeItem when I mouse over it
if it has actions associated with the item. Single clicking on the plus
should display a popup dialog (already in place, currently I display the
popup on double click events on the TableTreeViewer). I would like the icon
to appear on the left hand side of the TableTreeItem or alternatively as an
overlay/floating icon above the TableTreeItem text.
>
> To summarise:
> - How do I catch mouse over events on individual TableTreeItems (I know
how to get mouse {enter|leave|hover} events for the TableTree control but
not its items)
> - Can I add a clickable icon to the right of the first columns text (I
know about the icon limitation for the first TableTree column as the image
space is used to draw the expansion control).
> - is it possible to add draw stuff on top of the TableTreeViewer at
arbitary coordinates?
>
> Any suggestions on how to achieve this would be great.
> Thanks,
> Raj
>
Previous Topic:Detecting Combo Events
Next Topic:Buildin personal SWT
Goto Forum:
  


Current Time: Fri Apr 26 22:10:19 GMT 2024

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

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

Back to the top