Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Standard Widget Toolkit (SWT) » TreeItem.setExpanded() issue on Linux
TreeItem.setExpanded() issue on Linux [message #520433] Fri, 12 March 2010 11:16 Go to next message
ulrichsg  is currently offline ulrichsg Friend
Messages: 5
Registered: February 2010
Junior Member
Hi all,

I have a SWT Tree in my application where I set some of the TreeItems to expanded after inserting them. This works fine on Windows, but when building and running the app on Linux (gtk.x86_64), only the root item is expanded and all its children are collapsed. Is this a known issue, and does anyone know how to solve it?
Re: TreeItem.setExpanded() issue on Linux [message #520479 is a reply to message #520433] Fri, 12 March 2010 14:37 Go to previous messageGo to next message
Mark Mising name is currently offline Mark Mising nameFriend
Messages: 73
Registered: July 2009
Location: Ohio, USA
Member
I do not know how to address your problem specifically, but I accomplish the same behavior by using a TreeViewer (JFace) and using the TreeViewer's expandToLevel() method to accomplish this, instead of calling a TreeItem's method.

So, if you get nowhere with you problem, try this as an alternate approach...

Mark
Re: TreeItem.setExpanded() issue on Linux [message #520508 is a reply to message #520433] Fri, 12 March 2010 16:14 Go to previous messageGo to next message
Grant Gayed is currently offline Grant GayedFriend
Messages: 2150
Registered: July 2009
Senior Member
Hi,

It sounds like you're seeing
https://bugs.eclipse.org/bugs/show_bug.cgi?id=97757 . Using TreeViewer may
be one way of working around this. Otherwise, you can probably get this to
work at the swt level by changing the order of your item expansions from
depth-first to breadth-first, so that an item being programmatically
expanded always has all of its ancestor items already set to be expanded.

Grant


"ulrichsg" <ulrich.schmidt-goertz@plath.de> wrote in message
news:hnd7q5$6ho$1@build.eclipse.org...
> Hi all,
>
> I have a SWT Tree in my application where I set some of the TreeItems to
expanded after inserting them. This works fine on Windows, but when building
and running the app on Linux (gtk.x86_64), only the root item is expanded
and all its children are collapsed. Is this a known issue, and does anyone
know how to solve it?
Re: TreeItem.setExpanded() issue on Linux [message #520763 is a reply to message #520508] Mon, 15 March 2010 09:13 Go to previous message
ulrichsg  is currently offline ulrichsg Friend
Messages: 5
Registered: February 2010
Junior Member
Thanks, Grant. It looks like there are some serious issues with tree expanding using GTK - even if I tell my widgets (repeatedly and in no uncertain terms Cool) to expand all items and not collapse anything, the only thing I get is an expanded root with collapsed children.

And I'm not keen on rewriting the whole thing using TreeViewer after all the work I've already put into it Rolling Eyes
Previous Topic:Tracker won't release on Mouse-up
Next Topic:mouseExit triggers on scrollbar??
Goto Forum:
  


Current Time: Thu Apr 18 06:06:23 GMT 2024

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

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

Back to the top