Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Standard Widget Toolkit (SWT) » ToolItem.addListener
ToolItem.addListener [message #438714] Wed, 30 June 2004 21:08 Go to next message
selim is currently offline selimFriend
Messages: 31
Registered: July 2009
Member
I create a view and I add a toolbar an a canvas in parent(Composite).
Every thing is fine except ToolItem does not listen to Listener, Toolbar
does.
The code given below is the sample of what I do.
What is wrong here?

ToolBar bar = new ToolBar(parent,SWT.NONE);
//bar.addListener(SWT.MouseEnter,this);
ToolItem item = new ToolItem(bar, SWT.FLAT);
Image im=new Image(parent.getDisplay(),"....sample.gif");
item.setImage(im);
item.addListener(SWT.MouseEnter,this);

thanks..
Re: ToolItem.addListener [message #439002 is a reply to message #438714] Mon, 05 July 2004 19:21 Go to previous messageGo to next message
Grant Gayed is currently offline Grant GayedFriend
Messages: 2150
Registered: July 2009
Senior Member
The only event that ToolItem fires is Selection. There's a request for what
you're asking though, see
https://bugs.eclipse.org/bugs/show_bug.cgi?id=68266 .

Grant

"Selim Yucel" <selimyucel@yahoo.com> wrote in message
news:cbva3g$t6n$1@eclipse.org...
> I create a view and I add a toolbar an a canvas in parent(Composite).
> Every thing is fine except ToolItem does not listen to Listener, Toolbar
> does.
> The code given below is the sample of what I do.
> What is wrong here?
>
> ToolBar bar = new ToolBar(parent,SWT.NONE);
> //bar.addListener(SWT.MouseEnter,this);
> ToolItem item = new ToolItem(bar, SWT.FLAT);
> Image im=new Image(parent.getDisplay(),"....sample.gif");
> item.setImage(im);
> item.addListener(SWT.MouseEnter,this);
>
> thanks..
>
Re: ToolItem.addListener [message #439061 is a reply to message #438714] Mon, 05 July 2004 20:41 Go to previous message
Steve Northover is currently offline Steve NorthoverFriend
Messages: 1636
Registered: July 2009
Senior Member
Check the Javadoc to see which untyped events are implemented for each
widget.

"Selim Yucel" <selimyucel@yahoo.com> wrote in message
news:cbva3g$t6n$1@eclipse.org...
> I create a view and I add a toolbar an a canvas in parent(Composite).
> Every thing is fine except ToolItem does not listen to Listener, Toolbar
> does.
> The code given below is the sample of what I do.
> What is wrong here?
>
> ToolBar bar = new ToolBar(parent,SWT.NONE);
> //bar.addListener(SWT.MouseEnter,this);
> ToolItem item = new ToolItem(bar, SWT.FLAT);
> Image im=new Image(parent.getDisplay(),"....sample.gif");
> item.setImage(im);
> item.addListener(SWT.MouseEnter,this);
>
> thanks..
>
Previous Topic:Speed: animations with SWT
Next Topic:Graphs w/ SWT
Goto Forum:
  


Current Time: Fri Apr 26 18:37:39 GMT 2024

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

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

Back to the top