Skip to main content



      Home
Home » Eclipse Projects » Standard Widget Toolkit (SWT) » TreeItem.setExpanded() issue on Linux
TreeItem.setExpanded() issue on Linux [message #520433] Fri, 12 March 2010 06:16 Go to next message
Eclipse UserFriend
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 09:37 Go to previous messageGo to next message
Eclipse UserFriend
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 11:14 Go to previous messageGo to next message
Eclipse UserFriend
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 05:13 Go to previous message
Eclipse UserFriend
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: Wed Jul 16 09:44:12 EDT 2025

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

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

Back to the top