Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Standard Widget Toolkit (SWT) » After adding a selectionListener tree items don't expand on double-click
After adding a selectionListener tree items don't expand on double-click [message #448064] Thu, 30 December 2004 04:32 Go to next message
Eclipse UserFriend
Originally posted by: roberto.nucera.informatica.com

tree.addSelectionListener( new SelectionAdapter()
{

});

After adding this code the tree items no longer expand/collapse when the
user double-clicks on an item.

Can anyone help?

thanks,

roberto
Re: After adding a selectionListener tree items don't expand on double-click [message #448163 is a reply to message #448064] Tue, 04 January 2005 17:17 Go to previous message
Steve Northover is currently offline Steve NorthoverFriend
Messages: 1636
Registered: July 2009
Senior Member
Yes. On some platforms (for example, Windows), the default action when the
user double clicks on an item is to expand or collapse the item. When an
application program adds an SWT.DefaultSelection listener, this is disabled.
Why? If this weren't the case, then the tree would expand and the default
selection listener would run, causing two actions to happen. When you add a
SelectionListener, you are hooking both SWT.Selection and
SWT.DefaultSelection. The solution is it use an untyped listener and listen
only for SWT.Selection.

"Roberto Nucera" <roberto.nucera@informatica.com> wrote in message
news:cr00ci$uso$1@www.eclipse.org...
> tree.addSelectionListener( new SelectionAdapter()
> {
>
> });
>
> After adding this code the tree items no longer expand/collapse when the
> user double-clicks on an item.
>
> Can anyone help?
>
> thanks,
>
> roberto
>
>
Previous Topic:Solaris GTK 3.1M4 and libgcc dependancy
Next Topic:CCombo problem
Goto Forum:
  


Current Time: Fri Apr 19 04:03:43 GMT 2024

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

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

Back to the top